astepano / rpms / vim

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