diff src/charset.c @ 7072:05afb5be93bd v7.4.848

commit https://github.com/vim/vim/commit/5adfea1ac63e252556bccce54e92e8e10b58f592 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 1 18:51:39 2015 +0200 patch 7.4.848 Problem: CTRL-A on hex number in Visual block mode is incorrect. Solution: Account for the "0x". (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Tue, 01 Sep 2015 19:00:04 +0200
parents 58d9f967ae1a
children ad432f8f68fb
line wrap: on
line diff
--- a/src/charset.c
+++ b/src/charset.c
@@ -1909,6 +1909,8 @@ vim_str2nr(start, hexp, len, dooct, dohe
     else if (hex != 0 || dohex > 1)
     {
 	/* hex */
+	if (hex != 0)
+	    n += 2;	    /* skip over "0x" */
 	while (vim_isxdigit(*ptr))
 	{
 	    un = 16 * un + (unsigned long)hex2nr(*ptr);