Fix cursor location with ⌘← (fix #878)

This commit is contained in:
1024jp 2018-12-04 09:59:15 +09:00
parent 73d6b69e83
commit 0a3c9ab98e
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,11 @@ Change Log
- [dev] Stop LineNumberView inheriting NSRulerView.
### Fixes
- Fix the cursor location by changing the selection with shortcut `⌘←`.
3.6.7 (301)
--------------------------

View File

@ -569,7 +569,7 @@ final class EditorTextView: NSTextView, CurrentLineHighlighting, Themable {
let location = self.locationOfBeginningOfLine()
let range = NSRange(location..<location)
self.selectedRange = range
self.setSelectedRange(range, affinity: .downstream, stillSelecting: false)
self.scrollRangeToVisible(range)
}