Karsten Hopp dd8263
To: vim-dev@vim.org
Karsten Hopp dd8263
Subject: Patch 7.2.277
Karsten Hopp dd8263
Fcc: outbox
Karsten Hopp dd8263
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp dd8263
Mime-Version: 1.0
Karsten Hopp dd8263
Content-Type: text/plain; charset=UTF-8
Karsten Hopp dd8263
Content-Transfer-Encoding: 8bit
Karsten Hopp dd8263
------------
Karsten Hopp dd8263
Karsten Hopp dd8263
Patch 7.2.277
Karsten Hopp dd8263
Problem:    CTRL-Y in a diff'ed window may move the cursor outside of the
Karsten Hopp dd8263
	    window. (Lech Lorens)
Karsten Hopp dd8263
Solution:   Limit the number of filler lines to the height of the window.
Karsten Hopp dd8263
	    Don't reset filler lines to zero for an empty buffer.
Karsten Hopp dd8263
Files:	    src/move.c
Karsten Hopp dd8263
Karsten Hopp dd8263
Karsten Hopp dd8263
*** ../vim-7.2.276/src/move.c	2009-05-15 21:31:11.000000000 +0200
Karsten Hopp dd8263
--- src/move.c	2009-11-03 14:39:55.000000000 +0100
Karsten Hopp dd8263
***************
Karsten Hopp dd8263
*** 183,191 ****
Karsten Hopp dd8263
  	if (curwin->w_topline != 1)
Karsten Hopp dd8263
  	    redraw_later(NOT_VALID);
Karsten Hopp dd8263
  	curwin->w_topline = 1;
Karsten Hopp dd8263
- #ifdef FEAT_DIFF
Karsten Hopp dd8263
- 	curwin->w_topfill = 0;
Karsten Hopp dd8263
- #endif
Karsten Hopp dd8263
  	curwin->w_botline = 2;
Karsten Hopp dd8263
  	curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
Karsten Hopp dd8263
  #ifdef FEAT_SCROLLBIND
Karsten Hopp dd8263
--- 183,188 ----
Karsten Hopp dd8263
***************
Karsten Hopp dd8263
*** 1257,1263 ****
Karsten Hopp dd8263
      while (line_count-- > 0)
Karsten Hopp dd8263
      {
Karsten Hopp dd8263
  #ifdef FEAT_DIFF
Karsten Hopp dd8263
! 	if (curwin->w_topfill < diff_check(curwin, curwin->w_topline))
Karsten Hopp dd8263
  	{
Karsten Hopp dd8263
  	    ++curwin->w_topfill;
Karsten Hopp dd8263
  	    ++done;
Karsten Hopp dd8263
--- 1254,1261 ----
Karsten Hopp dd8263
      while (line_count-- > 0)
Karsten Hopp dd8263
      {
Karsten Hopp dd8263
  #ifdef FEAT_DIFF
Karsten Hopp dd8263
! 	if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)
Karsten Hopp dd8263
! 		&& curwin->w_topfill < curwin->w_height - 1)
Karsten Hopp dd8263
  	{
Karsten Hopp dd8263
  	    ++curwin->w_topfill;
Karsten Hopp dd8263
  	    ++done;
Karsten Hopp dd8263
*** ../vim-7.2.276/src/version.c	2009-11-03 16:03:59.000000000 +0100
Karsten Hopp dd8263
--- src/version.c	2009-11-03 16:22:04.000000000 +0100
Karsten Hopp dd8263
***************
Karsten Hopp dd8263
*** 678,679 ****
Karsten Hopp dd8263
--- 678,681 ----
Karsten Hopp dd8263
  {   /* Add new patch number below this line */
Karsten Hopp dd8263
+ /**/
Karsten Hopp dd8263
+     277,
Karsten Hopp dd8263
  /**/
Karsten Hopp dd8263
Karsten Hopp dd8263
-- 
Karsten Hopp dd8263
SIGFUN -- signature too funny (core dumped)
Karsten Hopp dd8263
Karsten Hopp dd8263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp dd8263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp dd8263
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp dd8263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///