mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.4.435
Problem: Line formatting behaves differently when 'linebreak' is set. (mvxxc) Solution: Disable 'linebreak' temporarily. (Christian Brabandt)
This commit is contained in:
@@ -6131,6 +6131,12 @@ internal_format(textwidth, second_indent, flags, format_only, c)
|
|||||||
int no_leader = FALSE;
|
int no_leader = FALSE;
|
||||||
int do_comments = (flags & INSCHAR_DO_COM);
|
int do_comments = (flags & INSCHAR_DO_COM);
|
||||||
#endif
|
#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
|
* 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 */
|
if (save_char != NUL) /* put back space after cursor */
|
||||||
pchar_cursor(save_char);
|
pchar_cursor(save_char);
|
||||||
|
|
||||||
|
#ifdef FEAT_LINEBREAK
|
||||||
|
curwin->w_p_lbr = has_lbr;
|
||||||
|
#endif
|
||||||
if (!format_only && haveto_redraw)
|
if (!format_only && haveto_redraw)
|
||||||
{
|
{
|
||||||
update_topline();
|
update_topline();
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
435,
|
||||||
/**/
|
/**/
|
||||||
434,
|
434,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user