mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.2313: Vim9: using uninitialized field when parsing range
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)
This commit is contained in:
parent
467b59c2eb
commit
ece0b87c0f
@ -661,6 +661,12 @@ def Test_range_after_command_modifier()
|
|||||||
bwipe!
|
bwipe!
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_silent_pattern()
|
||||||
|
new
|
||||||
|
silent! :/pat/put _
|
||||||
|
bwipe!
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_eval_command()
|
def Test_eval_command()
|
||||||
var from = 3
|
var from = 3
|
||||||
var to = 5
|
var to = 5
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2313,
|
||||||
/**/
|
/**/
|
||||||
2312,
|
2312,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3148,11 +3148,13 @@ call_def_function(
|
|||||||
goto failed;
|
goto failed;
|
||||||
++ectx.ec_stack.ga_len;
|
++ectx.ec_stack.ga_len;
|
||||||
tv = STACK_TV_BOT(-1);
|
tv = STACK_TV_BOT(-1);
|
||||||
|
ea.line2 = 0;
|
||||||
ea.addr_count = 0;
|
ea.addr_count = 0;
|
||||||
ea.addr_type = ADDR_LINES;
|
ea.addr_type = ADDR_LINES;
|
||||||
ea.cmd = iptr->isn_arg.string;
|
ea.cmd = iptr->isn_arg.string;
|
||||||
|
ea.skip = FALSE;
|
||||||
if (parse_cmd_address(&ea, &errormsg, FALSE) == FAIL)
|
if (parse_cmd_address(&ea, &errormsg, FALSE) == FAIL)
|
||||||
goto failed;
|
goto on_error;
|
||||||
if (ea.addr_count == 0)
|
if (ea.addr_count == 0)
|
||||||
tv->vval.v_number = curwin->w_cursor.lnum;
|
tv->vval.v_number = curwin->w_cursor.lnum;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user