]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.435 v7.4.435
authorBram Moolenaar <Bram@vim.org>
Tue, 9 Sep 2014 14:32:39 +0000 (16:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 9 Sep 2014 14:32:39 +0000 (16:32 +0200)
Problem:    Line formatting behaves differently when 'linebreak' is set.
            (mvxxc)
Solution:   Disable 'linebreak' temporarily. (Christian Brabandt)

src/edit.c
src/version.c

index 29721afa33e4f6d7228edd8f6d33fc07afb7fe2e..7e5e29ee91964397553261bfe5bdd15bfa6c2683 100644 (file)
@@ -6131,6 +6131,12 @@ internal_format(textwidth, second_indent, flags, format_only, c)
     int                no_leader = FALSE;
     int                do_comments = (flags & INSCHAR_DO_COM);
 #endif
+#ifdef FEAT_LINEBREAK
+    int                has_lbr = curwin->w_p_lbr;
+
+    /* make sure win_lbr_chartabsize() counts correctly */
+    curwin->w_p_lbr = FALSE;
+#endif
 
     /*
      * When 'ai' is off we don't want a space under the cursor to be
@@ -6483,6 +6489,9 @@ internal_format(textwidth, second_indent, flags, format_only, c)
     if (save_char != NUL)              /* put back space after cursor */
        pchar_cursor(save_char);
 
+#ifdef FEAT_LINEBREAK
+    curwin->w_p_lbr = has_lbr;
+#endif
     if (!format_only && haveto_redraw)
     {
        update_topline();
index 1e68b49e9f9b1aca8bfc7affe6887a9a5dffb048..5025c688757bbade2f9e7a8b3f7813d0c55f0639 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    435,
 /**/
     434,
 /**/