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

patch 8.2.2332: Vim9: missing :endif not reported when using :windo

Problem:    Vim9: missing :endif not reported when using :windo.
Solution:   Pass a getline function to do_cmdline(). (closes #7650)
This commit is contained in:
Bram Moolenaar
2021-01-11 22:16:30 +01:00
parent 082517570d
commit 9567efa1b4
5 changed files with 62 additions and 42 deletions

View File

@@ -1382,9 +1382,18 @@ call_def_function(
// execute Ex command line
case ISN_EXEC:
{
source_cookie_T cookie;
SOURCING_LNUM = iptr->isn_lnum;
do_cmdline_cmd(iptr->isn_arg.string);
if (did_emsg)
// Pass getsourceline to get an error for a missing ":end"
// command.
CLEAR_FIELD(cookie);
cookie.sourcing_lnum = iptr->isn_lnum - 1;
if (do_cmdline(iptr->isn_arg.string,
getsourceline, &cookie,
DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED)
== FAIL
|| did_emsg)
goto on_error;
}
break;