summaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-09-01 18:51:39 +0200
committerBram Moolenaar <Bram@vim.org>2015-09-01 18:51:39 +0200
commit5adfea1ac63e252556bccce54e92e8e10b58f592 (patch)
tree04bc312038adebab2e9cd2fcee55df5366b0ae30 /src/charset.c
parent8667d66ca923d361e00e6369cbff37283db5a432 (diff)
patch 7.4.848v7.4.848
Problem: CTRL-A on hex number in Visual block mode is incorrect. Solution: Account for the "0x". (Hirohito Higashi)
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c2
1 files changed, 2 insertions, 0 deletions
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);