changeset 6288:fcb898dea2bc v7.4.478

updated for version 7.4.478 Problem: Using byte length instead of character length for 'showbreak'. Solution: Compute the character length. (Marco Hinz)
author Bram Moolenaar <bram@vim.org>
date Wed, 15 Oct 2014 21:26:40 +0200
parents 7f7353f0c7ac
children 018ff5bd148a
files src/charset.c src/version.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c
+++ b/src/charset.c
@@ -1184,8 +1184,12 @@ win_lbr_chartabsize(wp, line, s, col, he
 	{
 	    col -= W_WIDTH(wp);
 	    numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
-	    if (*p_sbr != NUL && col >= (colnr_T)STRLEN(p_sbr))
-		col -= (colnr_T)STRLEN(p_sbr);
+	    if (*p_sbr != NUL)
+	    {
+		colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
+		if (col >= sbrlen)
+		    col -= sbrlen;
+	    }
 	    if (numberextra > 0)
 		col = col % numberextra;
 	}
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    478,
+/**/
     477,
 /**/
     476,