mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
fix(picker.actions): added hack to make folds work. Fixes #514
This commit is contained in:
parent
566f302903
commit
df1060fa50
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,13 @@ function M.edit(picker)
|
|||
-- center
|
||||
vim.cmd("norm! zzzv")
|
||||
end
|
||||
-- HACK: this should fix folds
|
||||
if vim.wo.foldmethod == "expr" then
|
||||
vim.schedule(function()
|
||||
vim.opt.foldmethod = "expr"
|
||||
end)
|
||||
end
|
||||
|
||||
if current_empty and vim.api.nvim_buf_is_valid(current_buf) then
|
||||
vim.api.nvim_buf_delete(current_buf, { force = true })
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue