aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-01-14 21:43:26 +0900
committerwatiko <service@mail.watiko.net>2016-02-01 03:43:37 +0900
commit1e94262efe6e059103698365d82ba02d6172dc57 (patch)
tree6a9909b132e9a8ce98ff2824b018c26431f33e07 /src/nvim/charset.c
parent61a3b14726fe54ac6a8949cad79a91ce9b6739a9 (diff)
downloadrneovim-1e94262efe6e059103698365d82ba02d6172dc57.tar.gz
rneovim-1e94262efe6e059103698365d82ba02d6172dc57.tar.bz2
rneovim-1e94262efe6e059103698365d82ba02d6172dc57.zip
vim-patch:7.4.848
Problem: CTRL-A on hex number in Visual block mode is incorrect. Solution: Account for the "0x". (Hirohito Higashi) https://github.com/vim/vim/commit/5adfea1ac63e252556bccce54e92e8e10b58f592
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index e689af0c82..02d4baaaef 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1862,6 +1862,9 @@ void vim_str2nr(char_u *start, int *prep, int *len,
}
} else if ((pre == 'X') || (pre == 'x') || dohex > 1) {
// hex
+ if (pre != 0) {
+ n += 2; // skip over "0x"
+ }
while (ascii_isxdigit(*ptr)) {
un = 16 * un + (unsigned long)hex2nr(*ptr);
ptr++;