Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lua/snacks/dashboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ function D:update()
-- cursor movement
local last = { 1, 0 }
local function update_cursor()
-- the dashboard window may now show a different buffer (e.g. it was replaced
-- with `:enew` while another split still displays the dashboard)
if not vim.api.nvim_win_is_valid(self.win) or vim.api.nvim_win_get_buf(self.win) ~= self.buf then
return
end
local item = self:find(vim.api.nvim_win_get_cursor(self.win), last)
-- can happen for panes without actionable items
item = item or vim.tbl_filter(function(it)
Expand Down