Skip to content

Commit bd3073b

Browse files
authored
fix(history): error when windows closed (#143)
Handle the case when the history dialog is open and an item is selected before the input/output windows are created. Fixes #141
1 parent e2a0f9f commit bd3073b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/opencode/ui/history_picker.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function M.pick(callback)
9494
local windows = state.windows
9595
if not input_window.mounted(windows) then
9696
require('opencode.core').open({ focus_input = true })
97+
windows = state.windows
9798
end
9899
---@cast windows { input_win: integer, input_buf: integer }
99100

0 commit comments

Comments
 (0)