@@ -46,11 +46,9 @@ import { readClipboardImageAsync } from "../core/clipboard";
4646import { useTerminalInput , usePasteHandling , useHistoryNavigation } from "../hooks" ;
4747import type { InputKey } from "../hooks" ;
4848import {
49- getPromptCursorPlacement ,
5049 useHiddenTerminalCursor ,
5150 useTerminalExtendedKeys ,
5251 useBracketedPaste ,
53- usePromptTerminalCursor ,
5452 useTerminalFocusReporting ,
5553} from "../hooks" ;
5654import SlashCommandMenu , { isSkillSelected } from "./SlashCommandMenu" ;
@@ -204,16 +202,9 @@ export const PromptInput = React.memo(function PromptInput({
204202 ( ) => showMenu || showSkillsDropdown || openRawModelDropdown || showModelDropdown || showFileMentionMenu ,
205203 [ showMenu , showSkillsDropdown , showModelDropdown , openRawModelDropdown , showFileMentionMenu ]
206204 ) ;
207- const cursorPlacement = useMemo (
208- ( ) => getPromptCursorPlacement ( buffer , screenWidth , 2 , footerText ) ,
209- [ buffer , footerText , screenWidth ]
210- ) ;
211- const usePositionedCursor = ! disabled && hasTerminalFocus && ! showFooterText ;
212- useTerminalFocusReporting ( stdout , ! disabled ) ;
213- useTerminalExtendedKeys ( stdout , ! disabled ) ;
214- useBracketedPaste ( stdout , ! disabled ) ;
215- usePromptTerminalCursor ( stdout , cursorPlacement , usePositionedCursor ) ;
216- useHiddenTerminalCursor ( stdout , ! disabled && ! usePositionedCursor ) ;
205+ // The prompt draws its own inverse-video cursor inside the text. Keep the
206+ // native terminal cursor hidden so wrapping edges do not show two cursors.
207+ const hideNativeCursor = ! disabled ;
217208
218209 const refreshFileMentionItems = React . useCallback ( ( ) => {
219210 setFileMentionItems ( scanFileMentionItems ( projectRoot ) ) ;
@@ -569,6 +560,10 @@ export const PromptInput = React.memo(function PromptInput({
569560 } ,
570561 { isActive : ! disabled }
571562 ) ;
563+ useTerminalFocusReporting ( stdout , ! disabled ) ;
564+ useTerminalExtendedKeys ( stdout , ! disabled ) ;
565+ useBracketedPaste ( stdout , ! disabled ) ;
566+ useHiddenTerminalCursor ( stdout , hideNativeCursor ) ;
572567
573568 function undo ( ) : void {
574569 const previous = undoPromptEdit ( undoRedoRef . current , buffer ) ;
0 commit comments