Mercurial > vim
comparison src/vim9execute.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 | b08f435d5b86 |
children | 576a69fc0066 |
comparison
equal
deleted
inserted
replaced
22613:6a54f3fd40dc | 22614:048a3033d19c |
---|---|
548 static int | 548 static int |
549 call_bfunc(int func_idx, int argcount, ectx_T *ectx) | 549 call_bfunc(int func_idx, int argcount, ectx_T *ectx) |
550 { | 550 { |
551 typval_T argvars[MAX_FUNC_ARGS]; | 551 typval_T argvars[MAX_FUNC_ARGS]; |
552 int idx; | 552 int idx; |
553 int did_emsg_before = did_emsg; | 553 int called_emsg_before = called_emsg; |
554 ectx_T *prev_ectx = current_ectx; | 554 ectx_T *prev_ectx = current_ectx; |
555 | 555 |
556 if (call_prepare(argcount, argvars, ectx) == FAIL) | 556 if (call_prepare(argcount, argvars, ectx) == FAIL) |
557 return FAIL; | 557 return FAIL; |
558 | 558 |
564 | 564 |
565 // Clear the arguments. | 565 // Clear the arguments. |
566 for (idx = 0; idx < argcount; ++idx) | 566 for (idx = 0; idx < argcount; ++idx) |
567 clear_tv(&argvars[idx]); | 567 clear_tv(&argvars[idx]); |
568 | 568 |
569 if (did_emsg != did_emsg_before) | 569 if (called_emsg != called_emsg_before) |
570 return FAIL; | 570 return FAIL; |
571 return OK; | 571 return OK; |
572 } | 572 } |
573 | 573 |
574 /* | 574 /* |