mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix line number drawing on Mountain Lion (fix #383)
This commit is contained in:
parent
0eebc3a2eb
commit
7203f66248
@ -26,6 +26,11 @@ develop
|
||||
- Improve general stability.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue where line numbers did't draw completely on OS X 10.8 when scroll bar is always shown.
|
||||
|
||||
|
||||
|
||||
2.1.6
|
||||
--------------------------
|
||||
|
@ -183,8 +183,12 @@ static const NSString *LineNumberFontName;
|
||||
CGContextSetTextMatrix(context, transform);
|
||||
CFRelease(font);
|
||||
|
||||
// add enough buffer to avoid broken drawing on Mountain Lion (10.8) with scroller (2015-07)
|
||||
NSRect visibleRect = [[self textView] visibleRect];
|
||||
visibleRect.size.height += fontSize;
|
||||
|
||||
// get glyph range which line number should be drawn
|
||||
NSRange visibleGlyphRange = [layoutManager glyphRangeForBoundingRect:[[self textView] visibleRect]
|
||||
NSRange visibleGlyphRange = [layoutManager glyphRangeForBoundingRect:visibleRect
|
||||
inTextContainer:[[self textView] textContainer]];
|
||||
|
||||
// counters
|
||||
|
Loading…
Reference in New Issue
Block a user