From 1c964ed43ff6839f3c7d068cd4a45f4bed0d4cb7 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sun, 26 Apr 2026 03:47:05 -0500 Subject: [PATCH] fix(tui): rely on native cursor for input --- ui-tui/src/components/textInput.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui-tui/src/components/textInput.tsx b/ui-tui/src/components/textInput.tsx index 66d212fbc2..35f1949b4b 100644 --- a/ui-tui/src/components/textInput.tsx +++ b/ui-tui/src/components/textInput.tsx @@ -336,21 +336,23 @@ export function TextInput({ active: focus && termFocus && !selected }) + const nativeCursor = focus && termFocus && !selected + const rendered = useMemo(() => { if (!focus) { return display || dim(placeholder) } if (!display && placeholder) { - return invert(placeholder[0] ?? ' ') + dim(placeholder.slice(1)) + return nativeCursor ? dim(placeholder) : invert(placeholder[0] ?? ' ') + dim(placeholder.slice(1)) } if (selected) { return renderWithSelection(display, selected.start, selected.end) } - return renderWithCursor(display, cur) - }, [cur, display, focus, placeholder, selected]) + return nativeCursor ? display || ' ' : renderWithCursor(display, cur) + }, [cur, display, focus, nativeCursor, placeholder, selected]) useEffect(() => { if (self.current) {