Karsten Hopp 398a64
To: vim_dev@googlegroups.com
Karsten Hopp 398a64
Subject: Patch 7.4.458
Karsten Hopp 398a64
Fcc: outbox
Karsten Hopp 398a64
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 398a64
Mime-Version: 1.0
Karsten Hopp 398a64
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 398a64
Content-Transfer-Encoding: 8bit
Karsten Hopp 398a64
------------
Karsten Hopp 398a64
Karsten Hopp 398a64
Patch 7.4.458
Karsten Hopp 398a64
Problem:    Issue 252: Cursor moves in a zero-height window.
Karsten Hopp 398a64
Solution:   Check for zero height. (idea by Christian Brabandt)
Karsten Hopp 398a64
Files:	    src/move.c
Karsten Hopp 398a64
Karsten Hopp 398a64
Karsten Hopp 398a64
*** ../vim-7.4.457/src/move.c	2014-03-28 21:49:26.854248777 +0100
Karsten Hopp 398a64
--- src/move.c	2014-09-23 18:27:33.138822349 +0200
Karsten Hopp 398a64
***************
Karsten Hopp 398a64
*** 183,188 ****
Karsten Hopp 398a64
--- 183,200 ----
Karsten Hopp 398a64
      if (!screen_valid(TRUE))
Karsten Hopp 398a64
  	return;
Karsten Hopp 398a64
  
Karsten Hopp 398a64
+     /* If the window height is zero just use the cursor line. */
Karsten Hopp 398a64
+     if (curwin->w_height == 0)
Karsten Hopp 398a64
+     {
Karsten Hopp 398a64
+ 	curwin->w_topline = curwin->w_cursor.lnum;
Karsten Hopp 398a64
+ 	curwin->w_botline = curwin->w_topline;
Karsten Hopp 398a64
+ 	curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
Karsten Hopp 398a64
+ #ifdef FEAT_SCROLLBIND
Karsten Hopp 398a64
+ 	curwin->w_scbind_pos = 1;
Karsten Hopp 398a64
+ #endif
Karsten Hopp 398a64
+ 	return;
Karsten Hopp 398a64
+     }
Karsten Hopp 398a64
+ 
Karsten Hopp 398a64
      check_cursor_moved(curwin);
Karsten Hopp 398a64
      if (curwin->w_valid & VALID_TOPLINE)
Karsten Hopp 398a64
  	return;
Karsten Hopp 398a64
*** ../vim-7.4.457/src/version.c	2014-09-23 16:49:38.798809517 +0200
Karsten Hopp 398a64
--- src/version.c	2014-09-23 17:50:55.642817549 +0200
Karsten Hopp 398a64
***************
Karsten Hopp 398a64
*** 743,744 ****
Karsten Hopp 398a64
--- 743,746 ----
Karsten Hopp 398a64
  {   /* Add new patch number below this line */
Karsten Hopp 398a64
+ /**/
Karsten Hopp 398a64
+     458,
Karsten Hopp 398a64
  /**/
Karsten Hopp 398a64
Karsten Hopp 398a64
-- 
Karsten Hopp 398a64
I'm so disorganized my keyboard isn't even in alphabetical order!
Karsten Hopp 398a64
Karsten Hopp 398a64
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 398a64
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 398a64
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 398a64
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///