We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ac6459 commit f1b9105Copy full SHA for f1b9105
cli/src/components/multiline-input.tsx
@@ -652,7 +652,10 @@ export const MultilineInput = forwardRef<
652
if (afterNewline === -1) {
653
afterNewline = value.length
654
}
655
- // For some reason, there is a special case for lastIndexOf for negative indices if the match is a prefix
+ /*
656
+ * The second argument of lastIndexOf is converted to 0 if it's
657
+ * negative, so we need to special case cursorPosition === 0
658
+ */
659
let prevNewlineExclusive =
660
cursorPosition === 0
661
? -1
0 commit comments