Patch 8.2.3318
Problem: Vim9: cannot ignore quotes in number at the command line.
Solution: Use in_vim9script() so that after ":vim9" quotes are ignored.
Files: src/typval.c, src/testdir/test_float_func.vim
*** ../vim-8.2.3317/src/typval.c 2021-08-08 15:43:30.105238234 +0200
--- src/typval.c 2021-08-08 19:51:58.913879270 +0200
***************
*** 1704,1710 ****
int want_string UNUSED)
{
int len;
! int skip_quotes = current_sctx.sc_version >= 4;
#ifdef FEAT_FLOAT
char_u *p;
int get_float = FALSE;
--- 1704,1710 ----
int want_string UNUSED)
{
int len;
! int skip_quotes = current_sctx.sc_version >= 4 ||
in_vim9script();
#ifdef FEAT_FLOAT
char_u *p;
int get_float = FALSE;
*** ../vim-8.2.3317/src/testdir/test_float_func.vim 2021-08-08
15:43:30.109238223 +0200
--- src/testdir/test_float_func.vim 2021-08-08 19:51:33.685930679 +0200
***************
*** 261,266 ****
--- 261,270 ----
call assert_fails("echo string(123'456.7'89)", 'E116:')
enddef
+ func Test_float_quotes_from_legacy()
+ call assert_equal("\n123456.789", execute("vim9 echo 12'34'56.789"))
+ endfunc
+
func Test_float2nr()
call assert_equal(1, float2nr(1.234))
call assert_equal(123, float2nr(1.234e2))
*** ../vim-8.2.3317/src/version.c 2021-08-08 19:07:32.924667679 +0200
--- src/version.c 2021-08-08 19:49:21.386189392 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3318,
/**/
--
ARTHUR: Bloody peasant!
DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
That's what I'm on about -- did you see him repressing me, you saw it
didn't you?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202108081756.178HuxxT2177168%40masaka.moolenaar.net.