vim-patch:7.4.435: Disable linebreak temporarily when formatting lines.

vim-patch:7.4.435

Problem:    Line formatting behaves differently when 'linebreak' is set.
            (mvxxc)
Solution:   Disable 'linebreak' temporarily. (Christian Brabandt)

https://code.google.com/p/vim/source/detail?r=v7-4-435
This commit is contained in:
Felipe Morales 2014-11-21 12:44:13 -03:00
parent ef7eab1ec6
commit cfa8b4a186
2 changed files with 7 additions and 1 deletions

View File

@ -5074,6 +5074,10 @@ internal_format (
colnr_T leader_len;
int no_leader = FALSE;
int do_comments = (flags & INSCHAR_DO_COM);
int has_lbr = curwin->w_p_lbr;
// make sure win_lbr_chartabsize() counts correctly
curwin->w_p_lbr = false;
/*
* When 'ai' is off we don't want a space under the cursor to be
@ -5363,6 +5367,8 @@ internal_format (
if (save_char != NUL) /* put back space after cursor */
pchar_cursor(save_char);
curwin->w_p_lbr = has_lbr;
if (!format_only && haveto_redraw) {
update_topline();
redraw_curbuf_later(VALID);

View File

@ -230,7 +230,7 @@ static int included_patches[] = {
//438,
437,
436,
//435,
435,
//434,
433,
//432 NA