Perform insertion drawing workaround only when needed

This commit is contained in:
1024jp 2019-04-05 19:48:06 +09:00
parent 2546793618
commit 2ffe7ea2f3
2 changed files with 9 additions and 2 deletions

View File

@ -10,13 +10,18 @@ Change Log
- “Input in unicode hex” now supports multi-cursor editing.
### Fixes
- Improve stability.
3.7.2 (347)
--------------------------
### Improvements
- Make the i-beam cursor more legible in vertical text orientation and dark background theme.
- Make the i-beam cursor legible in vertical text orientation and dark background theme.
- Use monospace numbers for line numbers in Find All result table.
- Optimize performance highlighting found matches.
- [dev] Update build environment to Xcode 10.2 (Swift 5).

View File

@ -774,7 +774,9 @@ final class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, Multi
override func setNeedsDisplay(_ invalidRect: NSRect) {
// expand rect as a workaroud for thick or multiple cursors (2018-11 macOS 10.14)
if self.cursorType != .bar || self.hasMultipleInsertions {
super.setNeedsDisplay(self.visibleRect, avoidAdditionalLayout: true)
}
super.setNeedsDisplay(invalidRect)
}