diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-09 16:32:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-09 16:32:39 +0200 |
commit | 0026d47d8cb6e6b135527ca489bbf81ac8e0045a (patch) | |
tree | aa04232ba44bcbd883a8998ff15681991973d96b /src | |
parent | 0e2ea1beb471a24dd86a45c439a98e5d758b4270 (diff) | |
download | vim-0026d47d8cb6e6b135527ca489bbf81ac8e0045a.zip |
updated for version 7.4.435
Problem: Line formatting behaves differently when 'linebreak' is set.
(mvxxc)
Solution: Disable 'linebreak' temporarily. (Christian Brabandt)
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c index 29721afa3..7e5e29ee9 100644 --- a/src/edit.c +++ b/src/edit.c @@ -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(); diff --git a/src/version.c b/src/version.c index 1e68b49e9..5025c6887 100644 --- 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 */ /**/ + 435, +/**/ 434, /**/ 433, |