forked from aniani/vim
patch 8.2.3318: Vim9: cannot ignore quotes in number at the command line
Problem: Vim9: cannot ignore quotes in number at the command line. Solution: Use in_vim9script() so that after ":vim9" quotes are ignored.
This commit is contained in:
@@ -261,6 +261,10 @@ def Test_float_quotes()
|
|||||||
call assert_fails("echo string(123'456.7'89)", 'E116:')
|
call assert_fails("echo string(123'456.7'89)", 'E116:')
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
func Test_float_quotes_from_legacy()
|
||||||
|
call assert_equal("\n123456.789", execute("vim9 echo 12'34'56.789"))
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_float2nr()
|
func Test_float2nr()
|
||||||
call assert_equal(1, float2nr(1.234))
|
call assert_equal(1, float2nr(1.234))
|
||||||
call assert_equal(123, float2nr(1.234e2))
|
call assert_equal(123, float2nr(1.234e2))
|
||||||
|
@@ -1704,7 +1704,7 @@ eval_number(
|
|||||||
int want_string UNUSED)
|
int want_string UNUSED)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
int skip_quotes = current_sctx.sc_version >= 4;
|
int skip_quotes = current_sctx.sc_version >= 4 || in_vim9script();
|
||||||
#ifdef FEAT_FLOAT
|
#ifdef FEAT_FLOAT
|
||||||
char_u *p;
|
char_u *p;
|
||||||
int get_float = FALSE;
|
int get_float = FALSE;
|
||||||
|
@@ -755,6 +755,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 */
|
||||||
|
/**/
|
||||||
|
3318,
|
||||||
/**/
|
/**/
|
||||||
3317,
|
3317,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user