mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
refactor: use vim._with
where possible
This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`.
This commit is contained in:
@ -964,7 +964,7 @@ local function goto_diagnostic(diagnostic, opts)
|
||||
|
||||
local winid = opts.winid or api.nvim_get_current_win()
|
||||
|
||||
api.nvim_win_call(winid, function()
|
||||
vim._with({ win = winid }, function()
|
||||
-- Save position in the window's jumplist
|
||||
vim.cmd("normal! m'")
|
||||
api.nvim_win_set_cursor(winid, { diagnostic.lnum + 1, diagnostic.col })
|
||||
|
Reference in New Issue
Block a user