fix(lsp): use winresetview() to avoid switching to normal mode (#38641)

(cherry picked from commit e31bfb81ce)
This commit is contained in:
Yi Ming
2026-04-01 00:31:30 +08:00
committed by github-actions[bot]
parent 32ca1aae88
commit 8f7cbf6d66

View File

@@ -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