diff --git a/lua/dep/ui/init.lua b/lua/dep/ui/init.lua index ca27ddd..12f9668 100644 --- a/lua/dep/ui/init.lua +++ b/lua/dep/ui/init.lua @@ -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