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

updated for version 7.4.478

Problem:    Using byte length instead of character length for 'showbreak'.
Solution:   Compute the character length. (Marco Hinz)
This commit is contained in:
Bram Moolenaar
2014-10-15 21:26:40 +02:00
parent e962c6795b
commit 1c85210d6d
2 changed files with 8 additions and 2 deletions

View File

@@ -1184,8 +1184,12 @@ win_lbr_chartabsize(wp, line, s, col, headp)
{ {
col -= W_WIDTH(wp); col -= W_WIDTH(wp);
numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp)); numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
if (*p_sbr != NUL && col >= (colnr_T)STRLEN(p_sbr)) if (*p_sbr != NUL)
col -= (colnr_T)STRLEN(p_sbr); {
colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
if (col >= sbrlen)
col -= sbrlen;
}
if (numberextra > 0) if (numberextra > 0)
col = col % numberextra; col = col % numberextra;
} }

View File

@@ -741,6 +741,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 */
/**/
478,
/**/ /**/
477, 477,
/**/ /**/