comparison src/vim9execute.c @ 23580:dc3b7a31c29f v8.2.2332

patch 8.2.2332: Vim9: missing :endif not reported when using :windo Commit: https://github.com/vim/vim/commit/9567efa1b4a41baca9b2266f5903d5dda7ad1e88 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 11 22:16:30 2021 +0100 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 https://github.com/vim/vim/issues/7650)
author Bram Moolenaar <Bram@vim.org>
date Mon, 11 Jan 2021 22:30:06 +0100
parents 754387a3aa35
children b875bbd517a6
comparison
equal deleted inserted replaced
23579:4569ede6f294 23580:dc3b7a31c29f
1380 switch (iptr->isn_type) 1380 switch (iptr->isn_type)
1381 { 1381 {
1382 // execute Ex command line 1382 // execute Ex command line
1383 case ISN_EXEC: 1383 case ISN_EXEC:
1384 { 1384 {
1385 source_cookie_T cookie;
1386
1385 SOURCING_LNUM = iptr->isn_lnum; 1387 SOURCING_LNUM = iptr->isn_lnum;
1386 do_cmdline_cmd(iptr->isn_arg.string); 1388 // Pass getsourceline to get an error for a missing ":end"
1387 if (did_emsg) 1389 // command.
1390 CLEAR_FIELD(cookie);
1391 cookie.sourcing_lnum = iptr->isn_lnum - 1;
1392 if (do_cmdline(iptr->isn_arg.string,
1393 getsourceline, &cookie,
1394 DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED)
1395 == FAIL
1396 || did_emsg)
1388 goto on_error; 1397 goto on_error;
1389 } 1398 }
1390 break; 1399 break;
1391 1400
1392 // execute Ex command from pieces on the stack 1401 // execute Ex command from pieces on the stack