mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix last line number drawing
This commit is contained in:
parent
5f2e1311c2
commit
16bc4528d5
@ -20,6 +20,7 @@ Change Log
|
||||
### Fixes
|
||||
|
||||
- Address an issue where the editor area could still be tuck under the line number view.
|
||||
- Fix an issue where the line number of the last empty line disappeared when lines are not wrapped and scrolled.
|
||||
- [trivial] Fix a weird view expansion on the first transition to the General preferences pane.
|
||||
- [trivial] Fix an issue on Mojave where the text selection highlight could remain between lines.
|
||||
|
||||
|
@ -84,7 +84,7 @@ extension NSTextView {
|
||||
guard includingExtraLine else { return }
|
||||
|
||||
let extraLineRect = layoutManager.extraLineFragmentUsedRect
|
||||
if !extraLineRect.isEmpty, extraLineRect.intersects(layoutRect) {
|
||||
if !extraLineRect.isEmpty, (layoutRect.minY...layoutRect.maxY).overlaps(extraLineRect.minY...extraLineRect.maxY) {
|
||||
let lineNumber = max(self.string.numberOfLines(includingLastLineEnding: true), 1)
|
||||
let isSelected = (selectedLineRanges.last?.location == (self.string as NSString).length)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user