mirror of https://github.com/folke/lazy.nvim.git
feat(ui): keep cursor position when rendering view
This commit is contained in:
parent
249902ab31
commit
591ded8309
|
@ -136,7 +136,7 @@ function Runner:_start()
|
|||
wait_step = s.step
|
||||
else
|
||||
s.task = self:queue(plugin, step)
|
||||
plugin._.working = not not s.task
|
||||
plugin._.working = true
|
||||
active = active + 1
|
||||
end
|
||||
end
|
||||
|
|
|
@ -146,7 +146,11 @@ end
|
|||
function M:update()
|
||||
if self.buf and vim.api.nvim_buf_is_valid(self.buf) then
|
||||
vim.bo[self.buf].modifiable = true
|
||||
local view = vim.api.nvim_win_call(self.view.win, vim.fn.winsaveview)
|
||||
self.render:update()
|
||||
vim.api.nvim_win_call(self.view.win, function()
|
||||
vim.fn.winrestview(view)
|
||||
end)
|
||||
vim.bo[self.buf].modifiable = false
|
||||
vim.cmd.redraw()
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue