]> granicus.if.org Git - vim/commitdiff
patch 9.0.0456: function called at debug prompt is also debugged v9.0.0456
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Sep 2022 11:36:57 +0000 (12:36 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Sep 2022 11:36:57 +0000 (12:36 +0100)
Problem:    Function called at debug prompt is also debugged.
Solution:   Reset the debug level while entering the debug command.
            (closes #11118)

src/debugger.c
src/version.c

index e2f73cca03159649b2492a717a1dd0a116b170cc..235d493d5819c813dc6d491fd5a2c653e5afb9f5 100644 (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);
index 3b143a463c273f0477e03b137bd910e8fef59fe6..85e5a9d3b17130aec56eb057352cda9ba1fce87d 100644 (file)
@@ -703,6 +703,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    456,
 /**/
     455,
 /**/