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

patch 9.0.0456: function called at debug prompt is also debugged

Problem:    Function called at debug prompt is also debugged.
Solution:   Reset the debug level while entering the debug command.
            (closes #11118)
This commit is contained in:
Bram Moolenaar
2022-09-13 12:36:57 +01:00
parent 5ed391708a
commit b1842de5ca
2 changed files with 7 additions and 0 deletions

View File

@@ -135,9 +135,14 @@ do_debug(char_u *cmd)
ignore_script = TRUE;
}
// don't debug any function call, e.g. from an expresion mapping
n = debug_break_level;
debug_break_level = -1;
vim_free(cmdline);
cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL);
debug_break_level = n;
if (typeahead_saved)
{
restore_typeahead(&typeaheadbuf, TRUE);