0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.4.458

Problem:    Issue 252: Cursor moves in a zero-height window.
Solution:   Check for zero height. (idea by Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2014-09-23 18:37:56 +02:00
parent 1db60c47d9
commit cfc216e7b0
2 changed files with 14 additions and 0 deletions

View File

@@ -183,6 +183,18 @@ update_topline()
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;
#ifdef FEAT_SCROLLBIND
curwin->w_scbind_pos = 1;
#endif
return;
}
check_cursor_moved(curwin); check_cursor_moved(curwin);
if (curwin->w_valid & VALID_TOPLINE) if (curwin->w_valid & VALID_TOPLINE)
return; return;

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
458,
/**/ /**/
457, 457,
/**/ /**/