Skip to content

Commit 7f1d906

Browse files
committed
Improve selection handling
1 parent dd3e9e7 commit 7f1d906

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa
691691
selectionStart = Math.max(selectionStart - prefix(0).length, 0)
692692
selectionEnd = selectionStart
693693
} else {
694-
selectionStart = Math.max(selectionStart - prefix.length, 0)
694+
selectionStart = Math.max(selectionStart - prefix(0).length, 0)
695695
selectionEnd = selectionEnd + totalPrefixLength
696696
}
697697
return {text: undoResult.text, selectionStart, selectionEnd}

0 commit comments

Comments
 (0)