Skip to content

Commit bb0f1fe

Browse files
committed
fix(renderer): no callback if windows gone
Can happen when closing the window
1 parent f27c9d8 commit bb0f1fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/opencode/ui/renderer.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ local trigger_on_data_rendered = require('opencode.util').debounce(function()
1919
return
2020
end
2121

22+
if not state.windows then
23+
return
24+
end
25+
2226
if cb_type == 'function' then
2327
pcall(config.ui.on_data_rendered, state.windows.output_buf, state.windows.output_win)
2428
elseif vim.fn.exists(':RenderMarkdown') > 0 then

0 commit comments

Comments
 (0)