Hey,

the help of 'showbreak' seems to suggest that multibyte characters are
allowed as long as they're visible and single-cell.

7.4.473 introduced STRLEN to compute the proper cursor placement and
doesn't take multibyte characters into account.

I hope the attached patch fixes it properly.

~mhi

-- 
Github: http://github.com/mhinz | Twitter: http://twitter.com/_mhinz_

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r 85a681178c6d src/charset.c
--- a/src/charset.c	Sat Oct 11 12:48:26 2014 +0200
+++ b/src/charset.c	Sat Oct 11 19:54:23 2014 +0200
@@ -1184,8 +1184,16 @@
 	{
 	    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;
+# ifdef FEAT_MBYTE
+		sbrlen = (colnr_T)MB_PTR2LEN(p_sbr);
+# else
+		sbrlen = (colnr_T)STRLEN(p_sbr);
+# endif
+		if (col >= sbrlen)
+		    col -= sbrlen;
+	    }
 	    if (numberextra > 0)
 		col = col % numberextra;
 	}

Raspunde prin e-mail lui