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