Mercurial > vim
comparison src/vim9compile.c @ 22614:048a3033d19c v8.2.1855
patch 8.2.1855: Vim9: get error message when nothing is wrong
Commit: https://github.com/vim/vim/commit/e13bdec6b90b3a0fce4f021e3ee986e731cea3b5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 16 23:16:47 2020 +0200
patch 8.2.1855: Vim9: get error message when nothing is wrong
Problem: Vim9: get error message when nothing is wrong.
Solution: Check called_emsg instead of did_emsg. (closes https://github.com/vim/vim/issues/7143)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Oct 2020 23:30:03 +0200 |
parents | 336ac63fb987 |
children | 1064b9f05b0a |
comparison
equal
deleted
inserted
replaced
22613:6a54f3fd40dc | 22614:048a3033d19c |
---|---|
6640 line = p; | 6640 line = p; |
6641 } | 6641 } |
6642 else if (eap->regname != NUL) | 6642 else if (eap->regname != NUL) |
6643 ++line; | 6643 ++line; |
6644 | 6644 |
6645 // TODO: if the range is something like "$" need to evaluate at runtime | 6645 // "errormsg" will not be set because the range is ADDR_LINES. |
6646 // TODO: if the range contains something like "$" or "." need to evaluate | |
6647 // at runtime | |
6646 if (parse_cmd_address(eap, &errormsg, FALSE) == FAIL) | 6648 if (parse_cmd_address(eap, &errormsg, FALSE) == FAIL) |
6647 return NULL; | 6649 return NULL; |
6648 if (eap->addr_count == 0) | 6650 if (eap->addr_count == 0) |
6649 lnum = -1; | 6651 lnum = -1; |
6650 else | 6652 else |
7397 ga_clear_strings(&ufunc->uf_lines); | 7399 ga_clear_strings(&ufunc->uf_lines); |
7398 | 7400 |
7399 if (errormsg != NULL) | 7401 if (errormsg != NULL) |
7400 emsg(errormsg); | 7402 emsg(errormsg); |
7401 else if (called_emsg == called_emsg_before) | 7403 else if (called_emsg == called_emsg_before) |
7402 emsg(_(e_compile_def_function_failed)); | 7404 emsg(_(e_compiling_def_function_failed)); |
7403 } | 7405 } |
7404 | 7406 |
7405 current_sctx = save_current_sctx; | 7407 current_sctx = save_current_sctx; |
7406 estack_compiling = save_estack_compiling; | 7408 estack_compiling = save_estack_compiling; |
7407 if (do_estack_push) | 7409 if (do_estack_push) |