From d250293c2e0a4a50f5ef6b4b6cd3257730338d13 Mon Sep 17 00:00:00 2001
From: shrutip90 <shruti.p90@gmail.com>
Date: Tue, 19 Aug 2025 21:20:41 -0700
Subject: Ignore workspace settings for untrusted folders (#6606)

---
 packages/cli/src/ui/contexts/VimModeContext.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'packages/cli/src/ui/contexts/VimModeContext.tsx')

diff --git a/packages/cli/src/ui/contexts/VimModeContext.tsx b/packages/cli/src/ui/contexts/VimModeContext.tsx
index b27034ef..40de0b53 100644
--- a/packages/cli/src/ui/contexts/VimModeContext.tsx
+++ b/packages/cli/src/ui/contexts/VimModeContext.tsx
@@ -12,6 +12,7 @@ import {
   useState,
 } from 'react';
 import { LoadedSettings, SettingScope } from '../../config/settings.js';
+import { SettingsContext } from './SettingsContext.js';
 
 export type VimMode = 'NORMAL' | 'INSERT';
 
@@ -26,11 +27,13 @@ const VimModeContext = createContext<VimModeContextType | undefined>(undefined);
 
 export const VimModeProvider = ({
   children,
-  settings,
+  settings: initialSettings,
 }: {
   children: React.ReactNode;
   settings: LoadedSettings;
 }) => {
+  const settingsContext = useContext(SettingsContext);
+  const settings = settingsContext?.settings || initialSettings;
   const initialVimEnabled = settings.merged.vimMode ?? false;
   const [vimEnabled, setVimEnabled] = useState(initialVimEnabled);
   const [vimMode, setVimMode] = useState<VimMode>(
-- 
cgit v1.2.3

