From aa6b9c677d83d76d448c3bb0973bf8d14bfdf922 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 8 Jun 2024 21:40:18 +0200 Subject: refactor: use `vim._with` where possible This mostly means replacing `nvim_buf_call` and `nvim_win_call` with `vim._with`. --- runtime/lua/vim/shared.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/shared.lua') diff --git a/runtime/lua/vim/shared.lua b/runtime/lua/vim/shared.lua index 6de1ce9d0c..621de2b1c2 100644 --- a/runtime/lua/vim/shared.lua +++ b/runtime/lua/vim/shared.lua @@ -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') -- cgit