Fix highlighting quoted string/block comment at the ndo of document (fix #281)

This commit is contained in:
1024jp 2014-11-20 04:01:47 +01:00
parent 7ce1894713
commit 535ea82942
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ changelog
- Fix an issue that some objects couldn't be handled via JavaScript for Automation on Yosemite.
- Fix an issue that syntax style validator didn't warn about keywords duplication that are newly added.
- Fix an issue that syntax style mapping conflict tables were always blank.
- Fix an issue that quoted texts and block comments at the end of document weren't highlighted.
- Fix an issue that text karning was too narrow with non-antiailiasing text (thanks to tsawada2-san).
- Fix an issue that text view scrolls to the opposite side when line number view is dragged.
- Fix an issue that word selection didn't expand correctly under the specific conditions.

View File

@ -523,7 +523,7 @@ static CGFloat kPerCompoIncrement;
[scanner scanUpToString:searchString intoString:nil];
NSUInteger startLocation = [scanner scanLocation];
if (startLocation + length >= localLength) { break; }
if (startLocation + length > localLength) { break; }
[scanner setScanLocation:(startLocation + length)];
@ -565,7 +565,7 @@ static CGFloat kPerCompoIncrement;
[scanner scanUpToString:beginString intoString:nil];
NSUInteger startLocation = [scanner scanLocation];
if (startLocation + beginLength >= localLength) { break; }
if (startLocation + beginLength > localLength) { break; }
[scanner setScanLocation:(startLocation + beginLength)];
NSUInteger escapesCheckLength = MIN(startLocation, kMaxEscapesCheckLength);