fix: use downstream caret affinity after heading edits
This commit is contained in:
@@ -335,7 +335,9 @@ final class NotesTextView: NSTextView, @MainActor NSLayoutManagerDelegate {
|
||||
if structural { breakUndoCoalescing() }
|
||||
}
|
||||
let caret = renderedRange(for: NSRange(location: caretPosition, length: 0))
|
||||
setSelectedRange(NSRange(location: hiddenBoundary(from: caret.location, forward: true), length: 0))
|
||||
// Upstream affinity places the caret above a paragraph's hidden leading glyphs.
|
||||
setSelectedRange(NSRange(location: hiddenBoundary(from: caret.location, forward: true), length: 0),
|
||||
affinity: .downstream, stillSelecting: false)
|
||||
}
|
||||
|
||||
override func deleteBackward(_ sender: Any?) {
|
||||
|
||||
Reference in New Issue
Block a user