mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.1.0579: Ex command is still executed after giving E1247
Problem: Ex command is still executed after giving E1247. Solution: Indicate the error properly and set cmd to NULL. (zeertzjq) closes: #15241 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
360c51208e
commit
d1b5ea984d
@ -4698,6 +4698,7 @@ get_address(
|
|||||||
if (n == MAXLNUM)
|
if (n == MAXLNUM)
|
||||||
{
|
{
|
||||||
emsg(_(e_line_number_out_of_range));
|
emsg(_(e_line_number_out_of_range));
|
||||||
|
cmd = NULL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4728,6 +4729,7 @@ get_address(
|
|||||||
if (lnum >= 0 && n >= LONG_MAX - lnum)
|
if (lnum >= 0 && n >= LONG_MAX - lnum)
|
||||||
{
|
{
|
||||||
emsg(_(e_line_number_out_of_range));
|
emsg(_(e_line_number_out_of_range));
|
||||||
|
cmd = NULL;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
lnum += n;
|
lnum += n;
|
||||||
|
@ -703,6 +703,8 @@ func Test_address_line_overflow()
|
|||||||
call setline(1, range(100))
|
call setline(1, range(100))
|
||||||
call assert_fails('|.44444444444444444444444', 'E1247:')
|
call assert_fails('|.44444444444444444444444', 'E1247:')
|
||||||
call assert_fails('|.9223372036854775806', 'E1247:')
|
call assert_fails('|.9223372036854775806', 'E1247:')
|
||||||
|
call assert_fails('.44444444444444444444444d', 'E1247:')
|
||||||
|
call assert_equal(range(100)->map('string(v:val)'), getline(1, '$'))
|
||||||
|
|
||||||
$
|
$
|
||||||
yank 77777777777777777777
|
yank 77777777777777777777
|
||||||
|
@ -704,6 +704,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 */
|
||||||
|
/**/
|
||||||
|
579,
|
||||||
/**/
|
/**/
|
||||||
578,
|
578,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user