fix(file rename): edit buffer when renaming to reset filetype

fixes https://github.com/kyazdani42/nvim-tree.lua/issues/1404
This commit is contained in:
kiyan 2022-07-10 09:38:34 +02:00
parent fd562ede63
commit 90bf14014e

View File

@ -199,6 +199,7 @@ function M.rename_loaded_buffers(old_path, new_path)
if a.nvim_buf_get_option(buf, "buftype") == "" then
a.nvim_buf_call(buf, function()
vim.cmd "silent! write!"
vim.cmd "edit"
end)
end
end