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:
dundargoc
2024-06-08 21:40:18 +02:00
committed by dundargoc
parent 496091b632
commit aa6b9c677d
17 changed files with 46 additions and 45 deletions

View File

@ -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')