File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ function M.open(opts)
4949
5050 local are_windows_closed = state .windows == nil
5151
52+ if not require (' opencode.ui.ui' ).is_opencode_focused () then
53+ require (' opencode.context' ).load ()
54+ end
55+
5256 if are_windows_closed then
5357 -- Check if whether prompting will be allowed
5458 local context_module = require (' opencode.context' )
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ function M.create_windows()
8383 local autocmds = require (' opencode.ui.autocmds' )
8484
8585 if not require (' opencode.ui.ui' ).is_opencode_focused () then
86- require (' opencode.context' ).load ()
8786 state .last_code_win_before_opencode = vim .api .nvim_get_current_win ()
8887 state .current_code_buf = vim .api .nvim_get_current_buf ()
8988 end
You can’t perform that action at this time.
0 commit comments