]> granicus.if.org Git - vim/commitdiff
patch 8.0.1143: macros always expand to the same thing v8.0.1143
authorBram Moolenaar <Bram@vim.org>
Sun, 24 Sep 2017 14:24:34 +0000 (16:24 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 24 Sep 2017 14:24:34 +0000 (16:24 +0200)
Problem:    Macros always expand to the same thing.
Solution:   Remove W_VSEP_WIDTH() and W_STATUS_HEIGHT().

src/ex_getln.c
src/gui.c
src/screen.c
src/structs.h
src/version.c
src/vim.h

index becfa007278f821390da76922b383ec1837a7e3f..9f7dad99aa5ea73af39b470917375b978c577304 100644 (file)
@@ -3438,7 +3438,7 @@ compute_cmdrow(void)
        cmdline_row = Rows - 1;
     else
        cmdline_row = W_WINROW(lastwin) + lastwin->w_height
-                                                  + W_STATUS_HEIGHT(lastwin);
+                                                   + lastwin->w_status_height;
 }
 
     static void
index a17c57112deb2d94387a5d8b4463fffad0a5a15e..fe91062e0a7e1118017fb291a98ec952552e4990 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -4910,10 +4910,10 @@ xy2win(int x UNUSED, int y UNUSED)
     }
     else if (row > wp->w_height)       /* below status line */
        update_mouseshape(SHAPE_IDX_CLINE);
-    else if (!(State & CMDLINE) && W_VSEP_WIDTH(wp) > 0 && col == wp->w_width
+    else if (!(State & CMDLINE) && wp->w_vsep_width > 0 && col == wp->w_width
            && (row != wp->w_height || !stl_connected(wp)) && msg_scrolled == 0)
        update_mouseshape(SHAPE_IDX_VSEP);
-    else if (!(State & CMDLINE) && W_STATUS_HEIGHT(wp) > 0
+    else if (!(State & CMDLINE) && wp->w_status_height > 0
                                  && row == wp->w_height && msg_scrolled == 0)
        update_mouseshape(SHAPE_IDX_STATUS);
     else
index 13b6a063236d984ffc439b238005f3fc71bc00d1..e505d941fc191fb8f0bc1a935b781f1dc7e17f19 100644 (file)
@@ -622,8 +622,8 @@ update_screen(int type_arg)
                    else
                    {
                        wp->w_redr_type = NOT_VALID;
-                       if (W_WINROW(wp) + wp->w_height + W_STATUS_HEIGHT(wp)
-                               <= msg_scrolled)
+                       if (W_WINROW(wp) + wp->w_height + wp->w_status_height
+                                                              <= msg_scrolled)
                            wp->w_redr_status = TRUE;
                    }
                }
@@ -9490,7 +9490,7 @@ win_ins_lines(
     {
        wp->w_redr_status = TRUE;
        redraw_cmdline = TRUE;
-       nextrow = W_WINROW(wp) + wp->w_height + W_STATUS_HEIGHT(wp);
+       nextrow = W_WINROW(wp) + wp->w_height + wp->w_status_height;
        lastrow = nextrow + line_count;
        if (lastrow > Rows)
            lastrow = Rows;
index 946857be5e2c268e7a3b9ddfe60992072c2160c9..7b0f70cd3c5edfb0594ab82be7f0dfacecdd4cd6 100644 (file)
@@ -2702,8 +2702,8 @@ struct window_S
     int                w_status_height;    /* number of status lines (0 or 1) */
     int                w_wincol;           /* Leftmost column of window in screen. */
     int                w_width;            /* Width of window, excluding separation. */
-    int                w_vsep_width;       /* Number of separator columns (0 or 1).
-                                      use W_VSEP_WIDTH() */
+    int                w_vsep_width;       /* Number of separator columns (0 or 1). */
+
     /*
      * === start of cached values ====
      */
index 14edfe4ce3714d94437f322246306c7b9ba0a7c2..1eb93ef28fc2edf1be9669abaa1861d6bb4884ef 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1143,
 /**/
     1142,
 /**/
index 43dbd8c4ab296117ea5012e50efed6a046de97bd..4567c366371a8dfa859da9cfd9ddddbf5226a8d3 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -860,8 +860,6 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
 #define FINDFILE_BOTH  2       /* files and directories */
 
 #define W_ENDCOL(wp)   (wp->w_wincol + wp->w_width)
-#define W_VSEP_WIDTH(wp) (wp->w_vsep_width)
-#define W_STATUS_HEIGHT(wp) (wp->w_status_height)
 #ifdef FEAT_MENU
 # define W_WINROW(wp)  (wp->w_winrow + wp->w_winbar_height)
 #else