diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-03-13 20:23:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-03-13 20:23:22 +0100 |
commit | 1e284f515581e0516e3f3dea568b9b9084bbcab1 (patch) | |
tree | 2c3c625111f9616d3073e67cc26fcc76d986c5bc /src/main.c | |
parent | 9584b31aae31d8b031243eab75e26fbaa1755a1f (diff) | |
download | vim-1e284f515581e0516e3f3dea568b9b9084bbcab1.zip |
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.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index ef4893458..6c4f8ecee 100644 --- a/src/main.c +++ b/src/main.c @@ -4025,8 +4025,6 @@ server_to_input_buf(str) /* * 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 * eval_client_expr_to_string(expr) @@ -4036,15 +4034,21 @@ eval_client_expr_to_string(expr) int save_dbl = debug_break_level; int save_ro = redir_off; + /* Disable debugging, otherwise Vim hangs, waiting for "cont" to be + * typed. */ debug_break_level = -1; 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); debug_break_level = save_dbl; 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 * that here. */ |