0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

updated for version 7.2.391

Problem:    Internal alloc(0) error when doing "CTRL-V $ c". (Martti Kuparinen)
Solution:   Fix computations in getvcol(). (partly by Lech Lorens)
This commit is contained in:
Bram Moolenaar
2010-03-10 14:46:26 +01:00
parent be678f86d1
commit 37d619f896
3 changed files with 14 additions and 9 deletions

View File

@@ -1255,6 +1255,9 @@ getvcol(wp, pos, start, cursor, end)
vcol = 0; vcol = 0;
ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
if (pos->col == MAXCOL)
posptr = NULL; /* continue until the NUL */
else
posptr = ptr + pos->col; posptr = ptr + pos->col;
/* /*
@@ -1313,7 +1316,7 @@ getvcol(wp, pos, start, cursor, end)
incr = CHARSIZE(c); incr = CHARSIZE(c);
} }
if (ptr >= posptr) /* character at pos->col */ if (posptr != NULL && ptr >= posptr) /* character at pos->col */
break; break;
vcol += incr; vcol += incr;
@@ -1334,7 +1337,7 @@ getvcol(wp, pos, start, cursor, end)
break; break;
} }
if (ptr >= posptr) /* character at pos->col */ if (posptr != NULL && ptr >= posptr) /* character at pos->col */
break; break;
vcol += incr; vcol += incr;

View File

@@ -681,6 +681,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 */
/**/
391,
/**/ /**/
390, 390,
/**/ /**/