0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

updated for version 7.3.414

Problem:    Using CTRL-A on "000" drops the leading zero, while on "001" it
            doesn't.
Solution:   Detect "000" as an octal number. (James McCoy)
This commit is contained in:
Bram Moolenaar
2012-01-26 13:40:08 +01:00
parent 38f5f9529a
commit 06af60244e
2 changed files with 6 additions and 4 deletions

View File

@@ -764,7 +764,7 @@ ptr2cells(p)
}
/*
* Return the number of characters string "s" will take on the screen,
* Return the number of character cells string "s" will take on the screen,
* counting TABs as two characters: "^I".
*/
int
@@ -775,8 +775,8 @@ vim_strsize(s)
}
/*
* Return the number of characters string "s[len]" will take on the screen,
* counting TABs as two characters: "^I".
* Return the number of character cells string "s[len]" will take on the
* screen, counting TABs as two characters: "^I".
*/
int
vim_strnsize(s, len)
@@ -1830,7 +1830,7 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
hex = 0; /* can't be octal */
break;
}
if (ptr[n] > '0')
if (ptr[n] >= '0')
hex = '0'; /* assume octal */
}
}