Fix control char drawing on legacy OS (fix #499)

This commit is contained in:
1024jp 2016-03-23 20:42:49 +09:00
parent 0acadc5704
commit 3643daec77
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,7 @@ develop
- Fix an issue where the backgorund of navigation/status bars were not dwarn under a specific condition.
- Fix an issue where the numbers in the line number view could be drawn in a wrong place if the editor is vertical text mode and unwapped.
- Fix an issue where document could not be drawn until the end of the file on legacy OS if the file contains control characters.

View File

@ -100,7 +100,9 @@
{
CELayoutManager *manager = (CELayoutManager *)[self layoutManager];
if (![manager showsOtherInvisibles] || ![manager showsInvisibles]) {
return [super boundingBoxForControlGlyphAtIndex:glyphIndex forTextContainer:textContainer proposedLineFragment:proposedRect glyphPosition:glyphPosition characterIndex:charIndex];
// DON'T invoke super method here. If invoked, it can not continue drawing remaining lines any more on Mountain Lion (and possible other versions except El Capitan).
// Just passing zero rect is enough if you dont need to draw.
return NSZeroRect;
}
// make blank space to draw a replacement character in CELayoutManager later.