mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.2035: recognizing octal numbers is confusing
Problem: Recognizing octal numbers is confusing. Solution: Introduce scriptversion 4: do not use octal and allow for single quote inside numbers.
This commit is contained in:
@@ -2617,7 +2617,9 @@ eval7(
|
||||
else
|
||||
{
|
||||
// decimal, hex or octal number
|
||||
vim_str2nr(*arg, NULL, &len, STR2NR_ALL, &n, NULL, 0, TRUE);
|
||||
vim_str2nr(*arg, NULL, &len, current_sctx.sc_version >= 4
|
||||
? STR2NR_NO_OCT + STR2NR_QUOTE
|
||||
: STR2NR_ALL, &n, NULL, 0, TRUE);
|
||||
if (len == 0)
|
||||
{
|
||||
semsg(_(e_invexpr2), *arg);
|
||||
|
Reference in New Issue
Block a user