vim-patch:9.0.0456: function called at debug prompt is also debugged (#20185)

Problem:    Function called at debug prompt is also debugged.
Solution:   Reset the debug level while entering the debug command.
            (closes vim/vim#11118)
b1842de5ca
This commit is contained in:
zeertzjq
2022-09-13 21:02:11 +08:00
committed by GitHub
parent 37e9688802
commit ec1f153ddc

View File

@@ -128,10 +128,15 @@ void do_debug(char *cmd)
ignore_script = true; ignore_script = true;
} }
// don't debug any function call, e.g. from an expresion mapping
n = debug_break_level;
debug_break_level = -1;
xfree(cmdline); xfree(cmdline);
cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL, cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL,
CALLBACK_NONE); CALLBACK_NONE);
debug_break_level = n;
if (typeahead_saved) { if (typeahead_saved) {
restore_typeahead(&typeaheadbuf); restore_typeahead(&typeaheadbuf);
ignore_script = save_ignore_script; ignore_script = save_ignore_script;