mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.1217: can't use remote eval to inspect vars in debug mode
Problem: Can't use remote eval to inspect vars in debug mode. Solution: Don't discard the call stack in debug mode. (closes #2237, #2247)
This commit is contained in:
10
src/main.c
10
src/main.c
@@ -4180,11 +4180,12 @@ eval_client_expr_to_string(char_u *expr)
|
||||
char_u *res;
|
||||
int save_dbl = debug_break_level;
|
||||
int save_ro = redir_off;
|
||||
void *fc;
|
||||
void *fc = NULL;
|
||||
|
||||
/* Evaluate the expression at the toplevel, don't use variables local to
|
||||
* the calling function. */
|
||||
fc = clear_current_funccal();
|
||||
* the calling function. Except when in debug mode. */
|
||||
if (!debug_mode)
|
||||
fc = clear_current_funccal();
|
||||
|
||||
/* Disable debugging, otherwise Vim hangs, waiting for "cont" to be
|
||||
* typed. */
|
||||
@@ -4201,7 +4202,8 @@ eval_client_expr_to_string(char_u *expr)
|
||||
--emsg_silent;
|
||||
if (emsg_silent < 0)
|
||||
emsg_silent = 0;
|
||||
restore_current_funccal(fc);
|
||||
if (fc != NULL)
|
||||
restore_current_funccal(fc);
|
||||
|
||||
/* A client can tell us to redraw, but not to display the cursor, so do
|
||||
* that here. */
|
||||
|
Reference in New Issue
Block a user