|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.602
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.602
|
|
|
22c937 |
Problem: ":set" does not accept hex numbers as documented.
|
|
|
22c937 |
Solution: Use vim_str2nr(). (ZyX)
|
|
|
22c937 |
Files: src/option.c, runtime/doc/options.txt
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.601/src/option.c 2014-11-30 13:34:16.885626772 +0100
|
|
|
22c937 |
--- src/option.c 2015-01-27 15:51:01.455344467 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 4540,4560 ****
|
|
|
22c937 |
goto skip;
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
- /* allow negative numbers (for 'undolevels') */
|
|
|
22c937 |
else if (*arg == '-' || VIM_ISDIGIT(*arg))
|
|
|
22c937 |
{
|
|
|
22c937 |
! i = 0;
|
|
|
22c937 |
! if (*arg == '-')
|
|
|
22c937 |
! i = 1;
|
|
|
22c937 |
! #ifdef HAVE_STRTOL
|
|
|
22c937 |
! value = strtol((char *)arg, NULL, 0);
|
|
|
22c937 |
! if (arg[i] == '0' && TOLOWER_ASC(arg[i + 1]) == 'x')
|
|
|
22c937 |
! i += 2;
|
|
|
22c937 |
! #else
|
|
|
22c937 |
! value = atol((char *)arg);
|
|
|
22c937 |
! #endif
|
|
|
22c937 |
! while (VIM_ISDIGIT(arg[i]))
|
|
|
22c937 |
! ++i;
|
|
|
22c937 |
if (arg[i] != NUL && !vim_iswhite(arg[i]))
|
|
|
22c937 |
{
|
|
|
22c937 |
errmsg = e_invarg;
|
|
|
22c937 |
--- 4540,4550 ----
|
|
|
22c937 |
goto skip;
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
else if (*arg == '-' || VIM_ISDIGIT(*arg))
|
|
|
22c937 |
{
|
|
|
22c937 |
! /* Allow negative (for 'undolevels'), octal and
|
|
|
22c937 |
! * hex numbers. */
|
|
|
22c937 |
! vim_str2nr(arg, NULL, &i, TRUE, TRUE, &value, NULL);
|
|
|
22c937 |
if (arg[i] != NUL && !vim_iswhite(arg[i]))
|
|
|
22c937 |
{
|
|
|
22c937 |
errmsg = e_invarg;
|
|
|
22c937 |
*** ../vim-7.4.601/runtime/doc/options.txt 2014-11-05 17:44:47.676471691 +0100
|
|
|
22c937 |
--- runtime/doc/options.txt 2015-01-27 15:47:53.873380762 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 59,67 ****
|
|
|
22c937 |
:se[t] {option}:{value}
|
|
|
22c937 |
Set string or number option to {value}.
|
|
|
22c937 |
For numeric options the value can be given in decimal,
|
|
|
22c937 |
! hex (preceded with 0x) or octal (preceded with '0')
|
|
|
22c937 |
! (hex and octal are only available for machines which
|
|
|
22c937 |
! have the strtol() function).
|
|
|
22c937 |
The old value can be inserted by typing 'wildchar' (by
|
|
|
22c937 |
default this is a <Tab> or CTRL-E if 'compatible' is
|
|
|
22c937 |
set). See |cmdline-completion|.
|
|
|
22c937 |
--- 59,65 ----
|
|
|
22c937 |
:se[t] {option}:{value}
|
|
|
22c937 |
Set string or number option to {value}.
|
|
|
22c937 |
For numeric options the value can be given in decimal,
|
|
|
22c937 |
! hex (preceded with 0x) or octal (preceded with '0').
|
|
|
22c937 |
The old value can be inserted by typing 'wildchar' (by
|
|
|
22c937 |
default this is a <Tab> or CTRL-E if 'compatible' is
|
|
|
22c937 |
set). See |cmdline-completion|.
|
|
|
22c937 |
*** ../vim-7.4.601/src/version.c 2015-01-27 15:18:55.156333265 +0100
|
|
|
22c937 |
--- src/version.c 2015-01-27 15:49:28.840349899 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 602,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
hundred-and-one symptoms of being an internet addict:
|
|
|
22c937 |
128. You can access the Net -- via your portable and cellular phone.
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|