refactor(cmdpreview): lift undo-checkpoint code

This is a mechanical lift of undo save-and-restore logic into... the
module that owns undo.
This commit is contained in:
Justin M. Keyes
2026-07-10 03:17:57 +02:00
parent 6bb1aa74e6
commit d3ffc94110
6 changed files with 105 additions and 95 deletions

View File

@@ -1222,7 +1222,7 @@ Object nvim_buf_call(Buffer buf, LuaRef fn, lua_State *lstate, Error *err)
}
TRY_WRAP(err, {
CtxSwitch cs;
CtxSwitch cs = { 0 };
ctx_switch(&cs, NULL, NULL, b, 0);
Array args = ARRAY_DICT_INIT;