Skip to content

Commit bb2fadd

Browse files
committed
fix types
1 parent 0b5fdac commit bb2fadd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/src/components/multiline-input.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export const MultilineInput = forwardRef<
274274
const cursorRow = lineInfo
275275
? Math.max(
276276
0,
277-
lineInfo.lineStarts.findLastIndex(
277+
lineInfo.lineStartCols.findLastIndex(
278278
(lineStart) => lineStart <= cursorPosition,
279279
),
280280
)
@@ -420,7 +420,7 @@ export const MultilineInput = forwardRef<
420420
const scrollBox = scrollBoxRef.current
421421
if (!scrollBox) return
422422

423-
const lineStarts = lineInfo?.lineStarts ?? [0]
423+
const lineStarts = lineInfo?.lineStartCols ?? [0]
424424

425425
const viewport = (scrollBox as any).viewport
426426
const viewportTop = Number(viewport?.y ?? 0)
@@ -616,7 +616,7 @@ export const MultilineInput = forwardRef<
616616
if (key.ctrl && lowerKeyName === 'u' && !key.meta && !key.option) {
617617
preventKeyDefault(key)
618618
if (handleSelectionDeletion()) return true
619-
const visualLineStart = lineInfo?.lineStarts?.[cursorRow] ?? lineStart
619+
const visualLineStart = lineInfo?.lineStartCols?.[cursorRow] ?? lineStart
620620

621621
if (cursorPosition > visualLineStart) {
622622
const newValue =
@@ -801,7 +801,7 @@ export const MultilineInput = forwardRef<
801801

802802
// Calculate visual line boundaries from lineInfo (accounts for word wrap)
803803
// Fall back to logical line boundaries if visual info is unavailable
804-
const lineStarts = currentLineInfo?.lineStarts ?? []
804+
const lineStarts = currentLineInfo?.lineStartCols ?? []
805805
const visualLineIndex = lineStarts.findLastIndex(
806806
(start) => start <= cursorPosition,
807807
)
@@ -1091,7 +1091,7 @@ export const MultilineInput = forwardRef<
10911091
const effectiveMinHeight = Math.max(1, Math.min(minHeight, safeMaxHeight))
10921092

10931093
const totalLines =
1094-
lineInfo === null ? 0 : lineInfo.lineStarts.length
1094+
lineInfo === null ? 0 : lineInfo.lineStartCols.length
10951095

10961096
// Add bottom gutter when cursor is on line 2 of exactly 2 lines
10971097
const gutterEnabled =

0 commit comments

Comments
 (0)