mirror of
https://github.com/vim/vim.git
synced 2025-10-07 05:54:16 -04:00
patch 8.0.1230: CTRL-A in Visual mode uses character after selection
Problem: CTRL-A in Visual mode uses character after selection. (Nikolai Pavlov) Solution: Check the length before using a character.
This commit is contained in:
@@ -1852,7 +1852,7 @@ vim_isblankline(char_u *lbuf)
|
|||||||
* If "what" contains STR2NR_OCT recognize octal numbers
|
* If "what" contains STR2NR_OCT recognize octal numbers
|
||||||
* If "what" contains STR2NR_HEX recognize hex numbers
|
* If "what" contains STR2NR_HEX recognize hex numbers
|
||||||
* If "what" contains STR2NR_FORCE always assume bin/oct/hex.
|
* If "what" contains STR2NR_FORCE always assume bin/oct/hex.
|
||||||
* If maxlen > 0, check at a maximum maxlen chars
|
* If maxlen > 0, check at a maximum maxlen chars.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vim_str2nr(
|
vim_str2nr(
|
||||||
@@ -1900,7 +1900,7 @@ vim_str2nr(
|
|||||||
if (what & STR2NR_OCT)
|
if (what & STR2NR_OCT)
|
||||||
{
|
{
|
||||||
/* Don't interpret "0", "08" or "0129" as octal. */
|
/* Don't interpret "0", "08" or "0129" as octal. */
|
||||||
for (n = 1; VIM_ISDIGIT(ptr[n]); ++n)
|
for (n = 1; n != maxlen && VIM_ISDIGIT(ptr[n]); ++n)
|
||||||
{
|
{
|
||||||
if (ptr[n] > '7')
|
if (ptr[n] > '7')
|
||||||
{
|
{
|
||||||
@@ -1908,8 +1908,6 @@ vim_str2nr(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pre = '0'; /* assume octal */
|
pre = '0'; /* assume octal */
|
||||||
if (n == maxlen)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1230,
|
||||||
/**/
|
/**/
|
||||||
1229,
|
1229,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user