fix(tui): capture pre-prompt spacer without shifting prompt layout

Revert the widened negative-margin prompt capture band and instead capture drags on the dedicated spacer row above the prompt. This keeps prompt/text alignment stable while still delegating whitespace-start drags to composer selection.

Made-with: Cursor
This commit is contained in:
Brooklyn Nicholson
2026-04-27 17:21:57 -05:00
parent 15cda17deb
commit da22b28bac

View File

@@ -121,7 +121,6 @@ const ComposerPane = memo(function ComposerPane({
composer,
status
}: Pick<AppLayoutProps, 'actions' | 'composer' | 'status'>) {
const PROMPT_CAPTURE_PAD = 4
const ui = useStore($uiState)
const isBlocked = useStore($isBlocked)
const sh = (composer.inputBuf[0] ?? composer.input).startsWith('!')
@@ -178,7 +177,12 @@ const ComposerPane = memo(function ComposerPane({
{status.stickyPrompt}
</Text>
) : (
<Box height={1} />
<Box
height={1}
onMouseDown={captureInputDrag}
onMouseDrag={dragIntoInput}
onMouseUp={() => inputMouseRef.current?.end()}
/>
)}
<StatusRulePane at="top" composer={composer} status={status} />
@@ -207,12 +211,10 @@ const ComposerPane = memo(function ComposerPane({
<Box position="relative">
<Box
marginLeft={-PROMPT_CAPTURE_PAD}
onMouseDown={captureInputDrag}
onMouseDrag={dragIntoInput}
onMouseUp={() => inputMouseRef.current?.end()}
paddingLeft={PROMPT_CAPTURE_PAD}
width={pw + PROMPT_CAPTURE_PAD}
width={pw}
>
{sh ? (
<Text color={ui.theme.color.shellDollar}>$ </Text>