mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix creating multiple cursors by rectangular selection
This commit is contained in:
parent
71f3ed53d9
commit
7081e116aa
@ -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)
|
||||
--------------------------
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user