mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(picker.preview): clear buftype for file previews
This commit is contained in:
parent
317a2093ea
commit
5429dff1cd
1 changed files with 1 additions and 0 deletions
|
@ -84,6 +84,7 @@ function M.file(ctx)
|
||||||
-- re-use existing preview when path is the same
|
-- re-use existing preview when path is the same
|
||||||
if path ~= Snacks.picker.util.path(ctx.prev) then
|
if path ~= Snacks.picker.util.path(ctx.prev) then
|
||||||
ctx.preview:reset()
|
ctx.preview:reset()
|
||||||
|
vim.bo[ctx.buf].buftype = ""
|
||||||
|
|
||||||
local name = vim.fn.fnamemodify(path, ":t")
|
local name = vim.fn.fnamemodify(path, ":t")
|
||||||
ctx.preview:set_title(ctx.item.title or name)
|
ctx.preview:set_title(ctx.item.title or name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue