don't error when the ui is closed
This commit is contained in:
@ -44,7 +44,9 @@ 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()
|
||||||
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
|
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
|
||||||
|
Reference in New Issue
Block a user