don't error when the ui is closed

This commit is contained in:
2025-07-02 20:36:14 -04:00
parent 1538046b6f
commit 5bd30d9397

View File

@ -44,7 +44,9 @@ local function page_log()
-- put the cursor at the bottom of the page after drawing
p.post_draw = function()
vim.api.nvim_win_set_cursor(ui.winnr, { #p.content, 0 })
if ui.winnr then
vim.api.nvim_win_set_cursor(ui.winnr, { #p.content, 0 })
end
end
-- read in the contents of the file, and keep watching for updates