]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.665 v7.4.665
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 14:58:52 +0000 (15:58 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 14:58:52 +0000 (15:58 +0100)
Problem:    'linebreak' does not work properly with multi-byte characters.
Solution:   Compute the pointer offset with mb_head_off().  (Yasuhiro
            Matsumoto)

src/screen.c
src/version.c

index 1d4fdd3d95539098b63ec3011099b3ee2f133208..1addd0ad41ad61dee684ebca22dacfb54e0bedc7 100644 (file)
@@ -4484,11 +4484,15 @@ win_line(wp, lnum, startrow, endrow, nochange)
                 */
                if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr))
                {
+# ifdef FEAT_MBYTE
+                   int off = has_mbyte ? (*mb_head_off)(line, ptr - 1) : 0;
+# endif
                    char_u *p = ptr - (
 # ifdef FEAT_MBYTE
-                               has_mbyte ? mb_l :
+                               off +
 # endif
                                1);
+
                    /* TODO: is passing p for start of the line OK? */
                    n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
                                                                    NULL) - 1;
@@ -4496,7 +4500,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
                        n_extra = (int)wp->w_buffer->b_p_ts
                                       - vcol % (int)wp->w_buffer->b_p_ts - 1;
 
+# ifdef FEAT_MBYTE
+                   c_extra = off > 0 ? MB_FILLER_CHAR : ' ';
+# else
                    c_extra = ' ';
+# endif
                    if (vim_iswhite(c))
                    {
 #ifdef FEAT_CONCEAL
index 265145a4ac2284e29dd966a2bb6493aecb08b01a..a9b8043a73ab0d529d191065ea75ced1e8cebf30 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    665,
 /**/
     664,
 /**/