comparison src/main.c @ 12678:116b7394b8af v8.0.1217

patch 8.0.1217: can't use remote eval to inspect vars in debug mode commit https://github.com/vim/vim/commit/d99388ba8535a6fecf7d0bf7b982832c0b816062 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 26 14:28:32 2017 +0200 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 https://github.com/vim/vim/issues/2237, https://github.com/vim/vim/issues/2247)
author Christian Brabandt <cb@256bit.org>
date Thu, 26 Oct 2017 14:30:04 +0200
parents e769c912fcd9
children 351cf7c67bbe
comparison
equal deleted inserted replaced
12677:4b2339dc1bf5 12678:116b7394b8af
4178 eval_client_expr_to_string(char_u *expr) 4178 eval_client_expr_to_string(char_u *expr)
4179 { 4179 {
4180 char_u *res; 4180 char_u *res;
4181 int save_dbl = debug_break_level; 4181 int save_dbl = debug_break_level;
4182 int save_ro = redir_off; 4182 int save_ro = redir_off;
4183 void *fc; 4183 void *fc = NULL;
4184 4184
4185 /* Evaluate the expression at the toplevel, don't use variables local to 4185 /* Evaluate the expression at the toplevel, don't use variables local to
4186 * the calling function. */ 4186 * the calling function. Except when in debug mode. */
4187 fc = clear_current_funccal(); 4187 if (!debug_mode)
4188 fc = clear_current_funccal();
4188 4189
4189 /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be 4190 /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be
4190 * typed. */ 4191 * typed. */
4191 debug_break_level = -1; 4192 debug_break_level = -1;
4192 redir_off = 0; 4193 redir_off = 0;
4199 debug_break_level = save_dbl; 4200 debug_break_level = save_dbl;
4200 redir_off = save_ro; 4201 redir_off = save_ro;
4201 --emsg_silent; 4202 --emsg_silent;
4202 if (emsg_silent < 0) 4203 if (emsg_silent < 0)
4203 emsg_silent = 0; 4204 emsg_silent = 0;
4204 restore_current_funccal(fc); 4205 if (fc != NULL)
4206 restore_current_funccal(fc);
4205 4207
4206 /* A client can tell us to redraw, but not to display the cursor, so do 4208 /* A client can tell us to redraw, but not to display the cursor, so do
4207 * that here. */ 4209 * that here. */
4208 setcursor(); 4210 setcursor();
4209 out_flush(); 4211 out_flush();