feat(ui): add terminal cursor support (#17711)

This commit is contained in:
Jacob Richman
2026-01-27 16:43:37 -08:00
committed by GitHub
parent fe8de892f7
commit 5e41b7d29e
5 changed files with 263 additions and 6 deletions
@@ -17,6 +17,7 @@ import {
cpSlice,
cpLen,
stripUnsafeCharacters,
cpIndexToOffset,
} from '../../utils/textUtils.js';
import { useKeypress, type Key } from '../../hooks/useKeypress.js';
import { keyMatchers, Command } from '../../keyMatchers.js';
@@ -558,6 +559,13 @@ export function BaseSettingsDialog({
? theme.text.secondary
: theme.text.primary
}
terminalCursorFocus={
editingKey === item.key && cursorVisible
}
terminalCursorPosition={cpIndexToOffset(
editBuffer,
editCursorPos,
)}
>
{displayValue}
</Text>