refactor: simplify aucmd_restbuf usage #39879

Problem:
`aucmd_restbuf` must be guarded in case `aucmd_prepbuf` wasn't called.

Solution:
Update `aucmd_restbuf` to be a no-op if `aucmd_prepbuf` wasn't called.
This requires `aco` to be zero-initialized.
This commit is contained in:
Justin M. Keyes
2026-05-19 05:09:23 -04:00
committed by GitHub
parent 353d2a4e4a
commit 16d17c50bb
15 changed files with 48 additions and 40 deletions

View File

@@ -639,7 +639,7 @@ static int nlua_with(lua_State *L)
Error err = ERROR_INIT;
TRY_WRAP(&err, {
aco_save_T aco;
aco_save_T aco = { 0 };
win_execute_T win_execute_args;
if (win) {