mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 23:22:39 +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:
@@ -84,7 +84,7 @@ function vim.inspect_pos(bufnr, row, col, filter)
|
||||
|
||||
-- syntax
|
||||
if filter.syntax and vim.api.nvim_buf_is_valid(bufnr) then
|
||||
vim.api.nvim_buf_call(bufnr, function()
|
||||
vim._with({ buf = bufnr }, function()
|
||||
for _, i1 in ipairs(vim.fn.synstack(row + 1, col + 1)) do
|
||||
results.syntax[#results.syntax + 1] =
|
||||
resolve_hl({ hl_group = vim.fn.synIDattr(i1, 'name') })
|
||||
|
||||
Reference in New Issue
Block a user