mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(picker.frecency): track visit on BufWinEnter instead of BufReadPost and exclude floating windows
This commit is contained in:
parent
5b3625bcea
commit
024a448e52
1 changed files with 5 additions and 1 deletions
|
@ -50,9 +50,13 @@ function M.setup()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
||||||
group = group,
|
group = group,
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
|
local current_win = vim.api.nvim_get_current_win()
|
||||||
|
if vim.api.nvim_win_get_config(current_win).relative ~= "" then
|
||||||
|
return
|
||||||
|
end
|
||||||
M.visit_buf(ev.buf)
|
M.visit_buf(ev.buf)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue