mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix instance highlighting when selecting multiple lines (fix #1090)
This commit is contained in:
parent
88add69c14
commit
4f12df91dd
@ -9,6 +9,10 @@ Change Log
|
||||
|
||||
- [trivial] Tweak some UI styles.
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix an issue in the instant highlighting that the highlight shape spread wrongly when the selected text included line breaks.
|
||||
|
||||
|
||||
|
||||
3.9.2 (425)
|
||||
|
@ -1604,7 +1604,7 @@ final class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, URLDe
|
||||
self.insertionLocations.isEmpty,
|
||||
self.selectedRanges.count == 1,
|
||||
!self.selectedRange.isEmpty,
|
||||
(try! NSRegularExpression(pattern: "^\\b\\w.*\\w\\b$"))
|
||||
(try! NSRegularExpression(pattern: "\\A\\b\\w.*\\w\\b\\z"))
|
||||
.firstMatch(in: self.string, options: [.withTransparentBounds], range: self.selectedRange) != nil
|
||||
else { return }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user