]> granicus.if.org Git - vim/commitdiff
patch 8.2.0309: window-local values have confusing name v8.2.0309
authorBram Moolenaar <Bram@vim.org>
Sun, 23 Feb 2020 14:29:46 +0000 (15:29 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 23 Feb 2020 14:29:46 +0000 (15:29 +0100)
Problem:    Window-local values have confusing name.
Solution:   Rename w_p_bri* to w_briopt_*.

src/drawline.c
src/indent.c
src/structs.h
src/version.c

index b5814114b6e2428d67d8d82b983b036c8b86930c..9f943e03aa97126e73710cf52112231756e7b135 100644 (file)
@@ -1140,11 +1140,11 @@ win_line(
            }
 
 #ifdef FEAT_LINEBREAK
-           if (wp->w_p_brisbr && draw_state == WL_BRI - 1
+           if (wp->w_briopt_sbr && draw_state == WL_BRI - 1
                            && n_extra == 0 && *get_showbreak_value(wp) != NUL)
                // draw indent after showbreak value
                draw_state = WL_BRI;
-           else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0)
+           else if (wp->w_briopt_sbr && draw_state == WL_SBR && n_extra == 0)
                // After the showbreak, draw the breakindent
                draw_state = WL_BRI - 1;
 
@@ -1176,7 +1176,7 @@ win_line(
                    c_final = NUL;
                    n_extra = get_breakindent_win(wp,
                                       ml_get_buf(wp->w_buffer, lnum, FALSE));
-                   if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_p_brisbr)
+                   if (wp->w_skipcol > 0 && wp->w_p_wrap && wp->w_briopt_sbr)
                        need_showbreak = FALSE;
                    // Correct end of highlighted area for 'breakindent',
                    // required when 'linebreak' is also set.
index 1662292bb3e96c6bddb2b349f372b6946e6884de..10c82d89de867e588fd2ec22a4c0d0444c096164 100644 (file)
@@ -875,9 +875,9 @@ briopt_check(win_T *wp)
            ++p;
     }
 
-    wp->w_p_brishift = bri_shift;
-    wp->w_p_brimin   = bri_min;
-    wp->w_p_brisbr   = bri_sbr;
+    wp->w_briopt_shift = bri_shift;
+    wp->w_briopt_min   = bri_min;
+    wp->w_briopt_sbr   = bri_sbr;
 
     return OK;
 }
@@ -927,10 +927,10 @@ get_breakindent_win(
                                     (int)wp->w_buffer->b_p_ts, wp->w_p_list);
 # endif
     }
-    bri = prev_indent + wp->w_p_brishift;
+    bri = prev_indent + wp->w_briopt_shift;
 
     // indent minus the length of the showbreak string
-    if (wp->w_p_brisbr)
+    if (wp->w_briopt_sbr)
        bri -= vim_strsize(get_showbreak_value(wp));
 
     // Add offset for number column, if 'n' is in 'cpoptions'
@@ -941,9 +941,9 @@ get_breakindent_win(
        bri = 0;
     // always leave at least bri_min characters on the left,
     // if text width is sufficient
-    else if (bri > eff_wwidth - wp->w_p_brimin)
-       bri = (eff_wwidth - wp->w_p_brimin < 0)
-                           ? 0 : eff_wwidth - wp->w_p_brimin;
+    else if (bri > eff_wwidth - wp->w_briopt_min)
+       bri = (eff_wwidth - wp->w_briopt_min < 0)
+                                          ? 0 : eff_wwidth - wp->w_briopt_min;
 
     return bri;
 }
index 4b70641711165b4e713051c358a4af7df5a26a21..7830e64433da751193b533d125e9b5810f58cef3 100644 (file)
@@ -3340,15 +3340,16 @@ struct window_S
 #ifdef FEAT_SYN_HL
     int                *w_p_cc_cols;       // array of columns to highlight or NULL
     char_u     w_p_culopt_flags;   // flags for cursorline highlighting
-#endif
-#ifdef FEAT_LINEBREAK
-    int                w_p_brimin;         // minimum width for breakindent
-    int                w_p_brishift;       // additional shift for breakindent
-    int                w_p_brisbr;         // sbr in 'briopt'
 #endif
     long       w_p_siso;           // 'sidescrolloff' local value
     long       w_p_so;             // 'scrolloff' local value
 
+#ifdef FEAT_LINEBREAK
+    int                w_briopt_min;       // minimum width for breakindent
+    int                w_briopt_shift;     // additional shift for breakindent
+    int                w_briopt_sbr;       // sbr in 'briopt'
+#endif
+
     // transform a pointer to a "onebuf" option into a "allbuf" option
 #define GLOBAL_WO(p)   ((char *)p + sizeof(winopt_T))
 
index db0034433386ae97b75a535365309100b2eb4906..b8e47fc56e254925c8d192f02897fd1cae2ba775 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    309,
 /**/
     308,
 /**/