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:
@ -1218,6 +1218,8 @@ end
|
||||
--- only moving context save and restore to lower level might resolve this.
|
||||
---
|
||||
--- @param context vim.context.mods
|
||||
--- @param f function
|
||||
--- @return any
|
||||
function vim._with(context, f)
|
||||
vim.validate('context', context, 'table')
|
||||
vim.validate('f', f, 'function')
|
||||
|
Reference in New Issue
Block a user