From 15356026d1e7ee8137f474d36f138802ba56a39c Mon Sep 17 00:00:00 2001 From: Cameron Ring Date: Wed, 17 Dec 2025 13:59:29 -0800 Subject: [PATCH] fix(history): error when windows closed Handle the case when the history dialog is open and an item is selected before the input/output windows are created. Fixes #141 --- lua/opencode/ui/history_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/opencode/ui/history_picker.lua b/lua/opencode/ui/history_picker.lua index aa3c2c15..9c6f941c 100644 --- a/lua/opencode/ui/history_picker.lua +++ b/lua/opencode/ui/history_picker.lua @@ -94,6 +94,7 @@ function M.pick(callback) local windows = state.windows if not input_window.mounted(windows) then require('opencode.core').open({ focus_input = true }) + windows = state.windows end ---@cast windows { input_win: integer, input_buf: integer }