Fix creating multiple cursors by rectangular selection

This commit is contained in:
1024jp 2019-11-14 19:41:23 +09:00
parent 71f3ed53d9
commit 7081e116aa
2 changed files with 17 additions and 8 deletions

View File

@ -2,6 +2,15 @@
Change Log
==========================
3.8.6 (unreleased)
--------------------------
### Fixes
- Fix an issue where creating multiple cursors by rectangular selection failed under macOS 10.15 Catalina.
3.8.5 (384)
--------------------------

View File

@ -687,15 +687,15 @@ final class EditorTextView: NSTextView, Themable, CurrentLineHighlighting, Multi
// interrupt rectangular selection
if self.isPerformingRectangularSelection {
if stillSelectingFlag {
if let locations = self.insertionLocations(from: self.mouseDownPoint, candidates: ranges) {
ranges = [NSRange(location: locations[0], length: 0)] as [NSValue]
self.insertionLocations = Array(locations[1...])
} else {
self.insertionLocations = []
}
if let locations = self.insertionLocations(from: self.mouseDownPoint, candidates: ranges) {
ranges = [NSRange(location: locations[0], length: 0)] as [NSValue]
self.insertionLocations = Array(locations[1...])
} else {
ranges = ranges.isEmpty ? self.selectedRanges : ranges
self.insertionLocations = []
}
if !stillSelectingFlag, ranges.isEmpty {
ranges = self.selectedRanges
}
}