0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.860

Problem:    When using --remote-expr try/catch does not work. (Andrey Radev)
Solution:   Set emsg_silent instead of emsg_off.
This commit is contained in:
Bram Moolenaar
2013-03-13 20:23:22 +01:00
parent 9584b31aae
commit 1e284f5155
2 changed files with 10 additions and 4 deletions

View File

@@ -4025,8 +4025,6 @@ server_to_input_buf(str)
/* /*
* Evaluate an expression that the client sent to a string. * Evaluate an expression that the client sent to a string.
* Handles disabling error messages and disables debugging, otherwise Vim
* hangs, waiting for "cont" to be typed.
*/ */
char_u * char_u *
eval_client_expr_to_string(expr) eval_client_expr_to_string(expr)
@@ -4036,15 +4034,21 @@ eval_client_expr_to_string(expr)
int save_dbl = debug_break_level; int save_dbl = debug_break_level;
int save_ro = redir_off; int save_ro = redir_off;
/* Disable debugging, otherwise Vim hangs, waiting for "cont" to be
* typed. */
debug_break_level = -1; debug_break_level = -1;
redir_off = 0; redir_off = 0;
++emsg_skip; /* Do not display error message, otherwise Vim hangs, waiting for "cont"
* to be typed. Do generate errors so that try/catch works. */
++emsg_silent;
res = eval_to_string(expr, NULL, TRUE); res = eval_to_string(expr, NULL, TRUE);
debug_break_level = save_dbl; debug_break_level = save_dbl;
redir_off = save_ro; redir_off = save_ro;
--emsg_skip; --emsg_silent;
if (emsg_silent < 0)
emsg_silent = 0;
/* A client can tell us to redraw, but not to display the cursor, so do /* A client can tell us to redraw, but not to display the cursor, so do
* that here. */ * that here. */

View File

@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
860,
/**/ /**/
859, 859,
/**/ /**/