diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d8fdf04..dcd93c8d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/CotEditor/Sources/CEATSTypesetter.m b/CotEditor/Sources/CEATSTypesetter.m index a3f978879..a0cd7dc49 100644 --- a/CotEditor/Sources/CEATSTypesetter.m +++ b/CotEditor/Sources/CEATSTypesetter.m @@ -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.