diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-09-13 21:02:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-13 21:02:11 +0800 |
commit | ec1f153ddc58e38bf21e2a47b9621feb63fd0e51 (patch) | |
tree | 24fa7fc55dc1b038bccd28c360473717055721b2 /src/nvim/debugger.c | |
parent | 37e968880256ca177524511848195b6c22318b34 (diff) | |
download | rneovim-ec1f153ddc58e38bf21e2a47b9621feb63fd0e51.tar.gz rneovim-ec1f153ddc58e38bf21e2a47b9621feb63fd0e51.tar.bz2 rneovim-ec1f153ddc58e38bf21e2a47b9621feb63fd0e51.zip |
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)
https://github.com/vim/vim/commit/b1842de5ca77205993e8ef76cf29803822e0e3ab
Diffstat (limited to 'src/nvim/debugger.c')
-rw-r--r-- | src/nvim/debugger.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c index e91491e665..8adeb19082 100644 --- a/src/nvim/debugger.c +++ b/src/nvim/debugger.c @@ -128,10 +128,15 @@ void do_debug(char *cmd) 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); cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL, CALLBACK_NONE); + debug_break_level = n; if (typeahead_saved) { restore_typeahead(&typeaheadbuf); ignore_script = save_ignore_script; |