From 5adfea1ac63e252556bccce54e92e8e10b58f592 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 1 Sep 2015 18:51:39 +0200 Subject: patch 7.4.848 Problem: CTRL-A on hex number in Visual block mode is incorrect. Solution: Account for the "0x". (Hirohito Higashi) --- src/charset.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/charset.c') diff --git a/src/charset.c b/src/charset.c index 327fa0375a..a74bf0d5bf 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1909,6 +1909,8 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr, maxlen) 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); -- cgit v1.2.3