forked from aniani/vim
patch 8.2.1853: "to_f" is recognized at "topleft" modifier
Problem: "to_f" is recognized at "topleft" modifier. Solution: Do not recognize modifer when "_" follows. (closes #7019)
This commit is contained in:
@@ -3123,7 +3123,7 @@ checkforcmd(
|
|||||||
for (i = 0; cmd[i] != NUL; ++i)
|
for (i = 0; cmd[i] != NUL; ++i)
|
||||||
if (((char_u *)cmd)[i] != (*pp)[i])
|
if (((char_u *)cmd)[i] != (*pp)[i])
|
||||||
break;
|
break;
|
||||||
if (i >= len && !isalpha((*pp)[i]))
|
if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_')
|
||||||
{
|
{
|
||||||
*pp = skipwhite(*pp + i);
|
*pp = skipwhite(*pp + i);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -454,7 +454,6 @@ def Test_assignment_local()
|
|||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_assignment_default()
|
def Test_assignment_default()
|
||||||
|
|
||||||
# Test default values.
|
# Test default values.
|
||||||
var thebool: bool
|
var thebool: bool
|
||||||
assert_equal(v:false, thebool)
|
assert_equal(v:false, thebool)
|
||||||
@@ -571,6 +570,10 @@ def Test_assignment_vim9script()
|
|||||||
assert_equal(43, w)
|
assert_equal(43, w)
|
||||||
var t: number = 44
|
var t: number = 44
|
||||||
assert_equal(44, t)
|
assert_equal(44, t)
|
||||||
|
|
||||||
|
var to_var = 0
|
||||||
|
to_var = 3
|
||||||
|
assert_equal(3, to_var)
|
||||||
END
|
END
|
||||||
CheckScriptSuccess(lines)
|
CheckScriptSuccess(lines)
|
||||||
|
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
1853,
|
||||||
/**/
|
/**/
|
||||||
1852,
|
1852,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user