Problem: Vim9: using uninitialized field when parsing range. ":silent!" not
respected when parsing range fails.
Solution: Initialize ea.skip. On pattern failure handle it like an error.
(closes #7636)
bwipe!
enddef
+def Test_silent_pattern()
+ new
+ silent! :/pat/put _
+ bwipe!
+enddef
+
def Test_eval_command()
var from = 3
var to = 5
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2313,
/**/
2312,
/**/
goto failed;
++ectx.ec_stack.ga_len;
tv = STACK_TV_BOT(-1);
+ ea.line2 = 0;
ea.addr_count = 0;
ea.addr_type = ADDR_LINES;
ea.cmd = iptr->isn_arg.string;
+ ea.skip = FALSE;
if (parse_cmd_address(&ea, &errormsg, FALSE) == FAIL)
- goto failed;
+ goto on_error;
if (ea.addr_count == 0)
tv->vval.v_number = curwin->w_cursor.lnum;
else