0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1130: unexpected output when autoloading a script

Problem:    Unexpected output when autoloading a script for an interactive
            operation.
Solution:   Reset "KeyTyped" while loading a script and when handling a nested
            function. (closes #11773)
This commit is contained in:
Bram Moolenaar
2023-01-02 13:08:01 +00:00
parent 7bdcba08bb
commit 39c82ea656
5 changed files with 65 additions and 3 deletions

View File

@@ -987,7 +987,14 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx, garray_T *lines_to_free)
goto theend;
}
// Make sure "KeyTyped" is not set, it may cause indent to be written.
int save_KeyTyped = KeyTyped;
KeyTyped = FALSE;
ufunc = define_function(eap, lambda_name, lines_to_free, FALSE);
KeyTyped = save_KeyTyped;
if (ufunc == NULL)
{
r = eap->skip ? OK : FAIL;