summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-16 23:16:47 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-16 23:16:47 +0200
commite13bdec6b90b3a0fce4f021e3ee986e731cea3b5 (patch)
treea6ac8242701cc1648c19ac9aa1fb5fabc4336ad8 /src/vim9compile.c
parent1e021e63c565bbb30783a557b4e883cc27f56403 (diff)
downloadvim-git-e13bdec6b90b3a0fce4f021e3ee986e731cea3b5.tar.gz
patch 8.2.1855: Vim9: get error message when nothing is wrongv8.2.1855
Problem: Vim9: get error message when nothing is wrong. Solution: Check called_emsg instead of did_emsg. (closes #7143)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 74156249e..edfa32566 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -6642,7 +6642,9 @@ compile_put(char_u *arg, exarg_T *eap, cctx_T *cctx)
else if (eap->regname != NUL)
++line;
- // TODO: if the range is something like "$" need to evaluate at runtime
+ // "errormsg" will not be set because the range is ADDR_LINES.
+ // TODO: if the range contains something like "$" or "." need to evaluate
+ // at runtime
if (parse_cmd_address(eap, &errormsg, FALSE) == FAIL)
return NULL;
if (eap->addr_count == 0)
@@ -7399,7 +7401,7 @@ erret:
if (errormsg != NULL)
emsg(errormsg);
else if (called_emsg == called_emsg_before)
- emsg(_(e_compile_def_function_failed));
+ emsg(_(e_compiling_def_function_failed));
}
current_sctx = save_current_sctx;