We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d76b16c commit 3ab8e87Copy full SHA for 3ab8e87
1 file changed
lua/opencode/ui/autocmds.lua
@@ -9,7 +9,7 @@ function M.setup_autocmds(windows)
9
input_window.setup_autocmds(windows, group)
10
output_window.setup_autocmds(windows, group)
11
12
- -- Only keep shared autocmds here (e.g., WinClosed, WinLeave for all windows)
+ -- Only keep shared autocmds here (e.g., WinClosed, CursorHold for all windows)
13
local wins = { windows.input_win, windows.output_win, windows.footer_win }
14
vim.api.nvim_create_autocmd('WinClosed', {
15
group = group,
@@ -24,7 +24,8 @@ function M.setup_autocmds(windows)
24
end,
25
})
26
27
- vim.api.nvim_create_autocmd('WinLeave', {
+ -- Based on CursorHold, update context if user is not focused on opencode window
28
+ vim.api.nvim_create_autocmd('CursorHold', {
29
30
pattern = '*',
31
callback = function()
0 commit comments