mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
ef7eab1ec6
commit
cfa8b4a186
@ -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);
|
||||
|
@ -230,7 +230,7 @@ static int included_patches[] = {
|
||||
//438,
|
||||
437,
|
||||
436,
|
||||
//435,
|
||||
435,
|
||||
//434,
|
||||
433,
|
||||
//432 NA
|
||||
|
Loading…
Reference in New Issue
Block a user