Skip to content

Commit 9482523

Browse files
committed
fix(file_edit): do not call bufload
1 parent 0761daa commit 9482523

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lua/fzf-lua/actions.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ M.vimcmd_entry = function(_vimcmd, selected, opts)
215215
then
216216
vim.bo.bufhidden = "wipe"
217217
end
218-
vim.fn.bufload(bufnr)
218+
-- NOTE: nvim_win_set_buf will load the buffer if needed
219+
-- calling bufload will mess up `BufReadPost` autocmds
220+
-- vim.fn.bufload(bufnr)
219221
local ok, _ = pcall(vim.api.nvim_win_set_buf, 0, bufnr)
220222
-- When `:set nohidden && set confirm`, neovim will invoke the save dialog
221223
-- and confirm with the user when trying to switch from a dirty buffer, if

0 commit comments

Comments
 (0)