Skip to content

Commit b81f56f

Browse files
committed
patch 8.2.0309: window-local values have confusing name
Problem: Window-local values have confusing name. Solution: Rename w_p_bri* to w_briopt_*.
1 parent 1aa76b8 commit b81f56f

4 files changed

Lines changed: 19 additions & 16 deletions

File tree

src/drawline.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,11 +1140,11 @@ win_line(
11401140
}
11411141

11421142
#ifdef FEAT_LINEBREAK
1143-
if (wp->w_p_brisbr && draw_state == WL_BRI - 1
1143+
if (wp->w_briopt_sbr && draw_state == WL_BRI - 1
11441144
&& n_extra == 0 && *get_showbreak_value(wp) != NUL)
11451145
// draw indent after showbreak value
11461146
draw_state = WL_BRI;
1147-
else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0)
1147+
else if (wp->w_briopt_sbr && draw_state == WL_SBR && n_extra == 0)
11481148
// After the showbreak, draw the breakindent
11491149
draw_state = WL_BRI - 1;
11501150

@@ -1176,7 +1176,7 @@ win_line(
11761176
c_final = NUL;
11771177
n_extra = get_breakindent_win(wp,
11781178
ml_get_buf(wp->w_buffer, lnum, FALSE));
1179-
if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr)
1179+
if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_briopt_sbr)
11801180
need_showbreak = FALSE;
11811181
// Correct end of highlighted area for 'breakindent',
11821182
// required when 'linebreak' is also set.

src/indent.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,9 @@ briopt_check(win_T *wp)
875875
++p;
876876
}
877877

878-
wp->w_p_brishift = bri_shift;
879-
wp->w_p_brimin = bri_min;
880-
wp->w_p_brisbr = bri_sbr;
878+
wp->w_briopt_shift = bri_shift;
879+
wp->w_briopt_min = bri_min;
880+
wp->w_briopt_sbr = bri_sbr;
881881

882882
return OK;
883883
}
@@ -927,10 +927,10 @@ get_breakindent_win(
927927
(int)wp->w_buffer->b_p_ts, wp->w_p_list);
928928
# endif
929929
}
930-
bri = prev_indent + wp->w_p_brishift;
930+
bri = prev_indent + wp->w_briopt_shift;
931931

932932
// indent minus the length of the showbreak string
933-
if (wp->w_p_brisbr)
933+
if (wp->w_briopt_sbr)
934934
bri -= vim_strsize(get_showbreak_value(wp));
935935

936936
// Add offset for number column, if 'n' is in 'cpoptions'
@@ -941,9 +941,9 @@ get_breakindent_win(
941941
bri = 0;
942942
// always leave at least bri_min characters on the left,
943943
// if text width is sufficient
944-
else if (bri > eff_wwidth - wp->w_p_brimin)
945-
bri = (eff_wwidth - wp->w_p_brimin < 0)
946-
? 0 : eff_wwidth - wp->w_p_brimin;
944+
else if (bri > eff_wwidth - wp->w_briopt_min)
945+
bri = (eff_wwidth - wp->w_briopt_min < 0)
946+
? 0 : eff_wwidth - wp->w_briopt_min;
947947

948948
return bri;
949949
}

src/structs.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3340,15 +3340,16 @@ struct window_S
33403340
#ifdef FEAT_SYN_HL
33413341
int *w_p_cc_cols; // array of columns to highlight or NULL
33423342
char_u w_p_culopt_flags; // flags for cursorline highlighting
3343-
#endif
3344-
#ifdef FEAT_LINEBREAK
3345-
int w_p_brimin; // minimum width for breakindent
3346-
int w_p_brishift; // additional shift for breakindent
3347-
int w_p_brisbr; // sbr in 'briopt'
33483343
#endif
33493344
long w_p_siso; // 'sidescrolloff' local value
33503345
long w_p_so; // 'scrolloff' local value
33513346

3347+
#ifdef FEAT_LINEBREAK
3348+
int w_briopt_min; // minimum width for breakindent
3349+
int w_briopt_shift; // additional shift for breakindent
3350+
int w_briopt_sbr; // sbr in 'briopt'
3351+
#endif
3352+
33523353
// transform a pointer to a "onebuf" option into a "allbuf" option
33533354
#define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T))
33543355

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
309,
741743
/**/
742744
308,
743745
/**/

0 commit comments

Comments
 (0)