mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.961
Problem: Test107 fails in some circunstances.
Solution: When using "zt", "zb" and "z=" recompute the fraction.
9dc2ce398b
This commit is contained in:
parent
faf828b476
commit
63606bb409
@ -4096,6 +4096,7 @@ dozet:
|
|||||||
|
|
||||||
case 't': scroll_cursor_top(0, true);
|
case 't': scroll_cursor_top(0, true);
|
||||||
redraw_later(VALID);
|
redraw_later(VALID);
|
||||||
|
set_fraction(curwin);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* "z." and "zz": put cursor in middle of screen */
|
/* "z." and "zz": put cursor in middle of screen */
|
||||||
@ -4104,6 +4105,7 @@ dozet:
|
|||||||
|
|
||||||
case 'z': scroll_cursor_halfway(true);
|
case 'z': scroll_cursor_halfway(true);
|
||||||
redraw_later(VALID);
|
redraw_later(VALID);
|
||||||
|
set_fraction(curwin);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* "z^", "z-" and "zb": put cursor at bottom of screen */
|
/* "z^", "z-" and "zb": put cursor at bottom of screen */
|
||||||
@ -4124,6 +4126,7 @@ dozet:
|
|||||||
|
|
||||||
case 'b': scroll_cursor_bot(0, true);
|
case 'b': scroll_cursor_bot(0, true);
|
||||||
redraw_later(VALID);
|
redraw_later(VALID);
|
||||||
|
set_fraction(curwin);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* "zH" - scroll screen right half-page */
|
/* "zH" - scroll screen right half-page */
|
||||||
|
@ -329,7 +329,7 @@ static int included_patches[] = {
|
|||||||
// 964 NA
|
// 964 NA
|
||||||
963,
|
963,
|
||||||
// 962 NA
|
// 962 NA
|
||||||
// 961,
|
961,
|
||||||
// 960 NA
|
// 960 NA
|
||||||
// 959 NA
|
// 959 NA
|
||||||
// 958,
|
// 958,
|
||||||
|
@ -4619,10 +4619,8 @@ void win_drag_vsep_line(win_T *dragwin, int offset)
|
|||||||
|
|
||||||
#define FRACTION_MULT 16384L
|
#define FRACTION_MULT 16384L
|
||||||
|
|
||||||
/*
|
// Set wp->w_fraction for the current w_wrow and w_height.
|
||||||
* Set wp->w_fraction for the current w_wrow and w_height.
|
void set_fraction(win_T *wp)
|
||||||
*/
|
|
||||||
static void set_fraction(win_T *wp)
|
|
||||||
{
|
{
|
||||||
wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT + wp->w_height / 2)
|
wp->w_fraction = ((long)wp->w_wrow * FRACTION_MULT + wp->w_height / 2)
|
||||||
/ (long)wp->w_height;
|
/ (long)wp->w_height;
|
||||||
|
Loading…
Reference in New Issue
Block a user