diff options
author | Tomasz N <przepompownia@users.noreply.github.com> | 2024-02-14 21:11:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 21:11:29 +0100 |
commit | d09957e0a06f350443c750d9838b5f1016c0cccc (patch) | |
tree | 9edcf45b3733c66ea838e96968167d36a59d1eb5 /runtime/lua/vim/lsp/util.lua | |
parent | a376d979bda103fa9998d05c3cc4ba56d3c3cece (diff) | |
download | rneovim-d09957e0a06f350443c750d9838b5f1016c0cccc.tar.gz rneovim-d09957e0a06f350443c750d9838b5f1016c0cccc.tar.bz2 rneovim-d09957e0a06f350443c750d9838b5f1016c0cccc.zip |
fix(lsp): rename: load and list new buffer if attached to window (#27408)
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 86bef1ac8a..4abc58ee3c 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -702,6 +702,8 @@ function M.rename(old_fname, new_fname, opts) if vim.fn.isdirectory(new_fname) == 0 then local newbuf = vim.fn.bufadd(new_fname) if win then + vim.fn.bufload(newbuf) + vim.bo[newbuf].buflisted = true api.nvim_win_set_buf(win, newbuf) end end |