fix: insert list body text after hidden separators

This commit is contained in:
Valdemar Lorenzen
2026-10-19 13:34:18 +02:00
parent ac28b6dd61
commit bbee699cc8
4 changed files with 72 additions and 4 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ final class NotesController: NSViewController, NSTextViewDelegate {
guard textView === editor, editor.isEditable,
commandSelector == #selector(NSResponder.insertNewline(_:)) else { return false }
let source = editor.markdownString as NSString
let selection = editor.markdownRange(for: editor.selectedRange())
let selection = editor.markdownInsertionRange(for: editor.selectedRange())
var start = 0, end = 0
source.getLineStart(&start, end: nil, contentsEnd: &end,
for: NSRange(location: selection.location, length: 0))