diff --git a/apps/cli/src/commands/main.tsx b/apps/cli/src/commands/main.tsx index b19b9167c..e8fdc957c 100644 --- a/apps/cli/src/commands/main.tsx +++ b/apps/cli/src/commands/main.tsx @@ -21,7 +21,7 @@ export function Main() { const [input, setInput] = useState(''); const [history, setHistory] = useState([]); const historyCounter = useRef(0); - const [vimEnabled] = useState(() => getSetting('vimMode')); + const [vimEnabled, setVimEnabled] = useState(() => getSetting('vimMode')); const [currentVimMode, setCurrentVimMode] = useState('insert'); const [showSettings, setShowSettings] = useState(false); const [isAutocompleteOpen, setIsAutocompleteOpen] = useState(false); @@ -79,7 +79,11 @@ export function Main() { if (showSettings) { return ( - setShowSettings(false)} /> + { + setShowSettings(false); + // Refresh vim enabled setting after settings close + setVimEnabled(getSetting('vimMode')); + }} /> ); }