mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
vim-patch:7.4.458
Problem: Issue 252: Cursor moves in a zero-height window. Solution: Check for zero height. (idea by Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-458
This commit is contained in:
@@ -146,6 +146,15 @@ void update_topline(void)
|
|||||||
if (!screen_valid(TRUE))
|
if (!screen_valid(TRUE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// If the window height is zero, just use the cursor line.
|
||||||
|
if (curwin->w_height == 0) {
|
||||||
|
curwin->w_topline = curwin->w_cursor.lnum;
|
||||||
|
curwin->w_botline = curwin->w_topline;
|
||||||
|
curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
|
||||||
|
curwin->w_scbind_pos = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
check_cursor_moved(curwin);
|
check_cursor_moved(curwin);
|
||||||
if (curwin->w_valid & VALID_TOPLINE)
|
if (curwin->w_valid & VALID_TOPLINE)
|
||||||
return;
|
return;
|
||||||
|
@@ -279,7 +279,7 @@ static int included_patches[] = {
|
|||||||
//461 NA
|
//461 NA
|
||||||
//460 NA
|
//460 NA
|
||||||
//459 NA
|
//459 NA
|
||||||
//458,
|
458,
|
||||||
457,
|
457,
|
||||||
456,
|
456,
|
||||||
455,
|
455,
|
||||||
|
Reference in New Issue
Block a user