aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2026-04-01 00:31:30 +0800
committerGitHub <noreply@github.com>2026-03-31 09:31:30 -0700
commite31bfb81ce796a8384eaebbf3f5a7184eebf153d (patch)
tree2cc8ef5952352fa9ce3415fd67ddeaaea363c498 /runtime/lua/vim
parentcd2a27507af59db750a3516e86e0c5c26775267f (diff)
downloadrneovim-e31bfb81ce796a8384eaebbf3f5a7184eebf153d.tar.gz
rneovim-e31bfb81ce796a8384eaebbf3f5a7184eebf153d.tar.bz2
rneovim-e31bfb81ce796a8384eaebbf3f5a7184eebf153d.zip
fix(lsp): use `winresetview()` to avoid switching to normal mode (#38641)
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/lsp/codelens.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua
index 30b4c4a8ca..66d7a0cab4 100644
--- a/runtime/lua/vim/lsp/codelens.lua
+++ b/runtime/lua/vim/lsp/codelens.lua
@@ -272,7 +272,7 @@ function Provider:on_win(toprow, botrow)
-- Fix https://github.com/neovim/neovim/issues/16166
-- Make sure the code lens on the first line is visible when updating.
if row == 0 then
- vim.cmd('normal! zb')
+ vim.fn.winrestview({ topfill = 1 })
end
end
self.row_version[row] = self.version