]> granicus.if.org Git - vim/commitdiff
patch 7.4.961 v7.4.961
authorBram Moolenaar <Bram@vim.org>
Sat, 5 Dec 2015 18:47:04 +0000 (19:47 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 5 Dec 2015 18:47:04 +0000 (19:47 +0100)
Problem:    Test107 fails in some circunstances.
Solution:   When using "zt", "zb" and "z=" recompute the fraction.

src/normal.c
src/proto/window.pro
src/version.c
src/window.c

index b9170ace5508dfe3b974a8a737643e3b0f32032a..89c67d9c8d197edfef5a34cb3db0eef2a6203df6 100644 (file)
@@ -4880,6 +4880,7 @@ dozet:
 
     case 't':  scroll_cursor_top(0, TRUE);
                redraw_later(VALID);
+               set_fraction(curwin);
                break;
 
                /* "z." and "zz": put cursor in middle of screen */
@@ -4888,6 +4889,7 @@ dozet:
 
     case 'z':  scroll_cursor_halfway(TRUE);
                redraw_later(VALID);
+               set_fraction(curwin);
                break;
 
                /* "z^", "z-" and "zb": put cursor at bottom of screen */
@@ -4910,6 +4912,7 @@ dozet:
 
     case 'b':  scroll_cursor_bot(0, TRUE);
                redraw_later(VALID);
+               set_fraction(curwin);
                break;
 
                /* "zH" - scroll screen right half-page */
index 0d719f0cc54b1a04a06d95acce6a965d1af4eb85..ffead2c804ab80280f3cf9712651878f6be4707f 100644 (file)
@@ -53,6 +53,7 @@ void win_setwidth_win __ARGS((int width, win_T *wp));
 void win_setminheight __ARGS((void));
 void win_drag_status_line __ARGS((win_T *dragwin, int offset));
 void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
+void set_fraction __ARGS((win_T *wp));
 void win_new_height __ARGS((win_T *wp, int height));
 void win_new_width __ARGS((win_T *wp, int width));
 void win_comp_scroll __ARGS((win_T *wp));
index 052bbc9fb300c33db6933e9936901e453c7e24bb..514f8be76c2c3f8d8af31689ec13b2f2de7cb263 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    961,
 /**/
     960,
 /**/
index 010d7ae50aef8776df674a25e4d78252892e16e6..613cc5fb2f8874a36b6f933ab509388c621e7c17 100644 (file)
@@ -75,7 +75,6 @@ static int frame_check_width __ARGS((frame_T *topfrp, int width));
 #endif /* FEAT_WINDOWS */
 
 static win_T *win_alloc __ARGS((win_T *after, int hidden));
-static void set_fraction __ARGS((win_T *wp));
 
 #define URL_SLASH      1               /* path_is_url() has found "://" */
 #define URL_BACKSLASH  2               /* path_is_url() has found ":\\" */
@@ -5828,7 +5827,7 @@ win_drag_vsep_line(dragwin, offset)
 /*
  * Set wp->w_fraction for the current w_wrow and w_height.
  */
-    static void
+    void
 set_fraction(wp)
     win_T      *wp;
 {