diff options
Diffstat (limited to 'packages/cli/src/ui/components/InputPrompt.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 8d296dc4..17b7694e 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -39,6 +39,7 @@ export interface InputPromptProps { suggestionsWidth: number; shellModeActive: boolean; setShellModeActive: (value: boolean) => void; + vimHandleInput?: (key: Key) => boolean; } export const InputPrompt: React.FC<InputPromptProps> = ({ @@ -55,6 +56,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ suggestionsWidth, shellModeActive, setShellModeActive, + vimHandleInput, }) => { const [justNavigatedHistory, setJustNavigatedHistory] = useState(false); @@ -169,6 +171,10 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ return; } + if (vimHandleInput && vimHandleInput(key)) { + return; + } + if ( key.sequence === '!' && buffer.text === '' && @@ -347,6 +353,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ shellHistory, handleClipboardImage, resetCompletionState, + vimHandleInput, ], ); |
