mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 23:01:24 +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:
@@ -71,7 +71,7 @@ function M.range(bufnr, ns, higroup, start, finish, opts)
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_buf_call(bufnr, function()
|
||||
vim._with({ buf = bufnr }, function()
|
||||
if pos1[3] ~= v_maxcol then
|
||||
local max_col1 = vim.fn.col({ pos1[2], '$' })
|
||||
pos1[3] = math.min(pos1[3], max_col1)
|
||||
|
||||
Reference in New Issue
Block a user