Skip to content

Commit 9dc2ce3

Browse files
committed
patch 7.4.961
Problem: Test107 fails in some circunstances. Solution: When using "zt", "zb" and "z=" recompute the fraction.
1 parent 90f5d0a commit 9dc2ce3

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/normal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4880,6 +4880,7 @@ nv_zet(cap)
48804880

48814881
case 't': scroll_cursor_top(0, TRUE);
48824882
redraw_later(VALID);
4883+
set_fraction(curwin);
48834884
break;
48844885

48854886
/* "z." and "zz": put cursor in middle of screen */
@@ -4888,6 +4889,7 @@ nv_zet(cap)
48884889

48894890
case 'z': scroll_cursor_halfway(TRUE);
48904891
redraw_later(VALID);
4892+
set_fraction(curwin);
48914893
break;
48924894

48934895
/* "z^", "z-" and "zb": put cursor at bottom of screen */
@@ -4910,6 +4912,7 @@ nv_zet(cap)
49104912

49114913
case 'b': scroll_cursor_bot(0, TRUE);
49124914
redraw_later(VALID);
4915+
set_fraction(curwin);
49134916
break;
49144917

49154918
/* "zH" - scroll screen right half-page */

src/proto/window.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void win_setwidth_win __ARGS((int width, win_T *wp));
5353
void win_setminheight __ARGS((void));
5454
void win_drag_status_line __ARGS((win_T *dragwin, int offset));
5555
void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
56+
void set_fraction __ARGS((win_T *wp));
5657
void win_new_height __ARGS((win_T *wp, int height));
5758
void win_new_width __ARGS((win_T *wp, int width));
5859
void win_comp_scroll __ARGS((win_T *wp));

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
961,
744746
/**/
745747
960,
746748
/**/

src/window.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ static int frame_check_width __ARGS((frame_T *topfrp, int width));
7575
#endif /* FEAT_WINDOWS */
7676

7777
static win_T *win_alloc __ARGS((win_T *after, int hidden));
78-
static void set_fraction __ARGS((win_T *wp));
7978

8079
#define URL_SLASH 1 /* path_is_url() has found "://" */
8180
#define URL_BACKSLASH 2 /* path_is_url() has found ":\\" */
@@ -5828,7 +5827,7 @@ win_drag_vsep_line(dragwin, offset)
58285827
/*
58295828
* Set wp->w_fraction for the current w_wrow and w_height.
58305829
*/
5831-
static void
5830+
void
58325831
set_fraction(wp)
58335832
win_T *wp;
58345833
{

0 commit comments

Comments
 (0)