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)
diff --git a/src/debugger.c b/src/debugger.c
index e2f73cc..235d493 100644
--- a/src/debugger.c
+++ b/src/debugger.c
@@ -135,9 +135,14 @@
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);