fix: restore empty list exit and keyboard indentation

This commit is contained in:
Valdemar Lorenzen
2026-10-19 15:06:47 +02:00
parent 21619c5420
commit 1c3ecb232b
4 changed files with 221 additions and 21 deletions
+9
View File
@@ -208,6 +208,15 @@ final class NotesTextView: NSTextView, @MainActor NSLayoutManagerDelegate {
return markdownRange(for: NSRange(location: body, length: 0))
}
override func keyDown(with event: NSEvent) {
if event.keyCode == 48,
event.modifierFlags.intersection([.command, .control, .option, .shift]) == .shift,
delegate?.textView?(self, doCommandBy: #selector(NSResponder.insertBacktab(_:))) == true {
return
}
super.keyDown(with: event)
}
override func insertText(_ insertString: Any, replacementRange: NSRange) {
let replacement: NSAttributedString
if let attributed = insertString as? NSAttributedString {