Karsten Hopp e7a6c0
To: vim_dev@googlegroups.com
Karsten Hopp e7a6c0
Subject: Patch 7.4.853
Karsten Hopp e7a6c0
Fcc: outbox
Karsten Hopp e7a6c0
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e7a6c0
Mime-Version: 1.0
Karsten Hopp e7a6c0
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e7a6c0
Content-Transfer-Encoding: 8bit
Karsten Hopp e7a6c0
------------
Karsten Hopp e7a6c0
Karsten Hopp e7a6c0
Patch 7.4.853
Karsten Hopp e7a6c0
Problem:    "zt" in diff mode does not always work properly. (Gary Johnson)
Karsten Hopp e7a6c0
Solution:   Don't count filler lines twice. (Christian Brabandt)
Karsten Hopp e7a6c0
Files:      src/move.c
Karsten Hopp e7a6c0
Karsten Hopp e7a6c0
Karsten Hopp e7a6c0
*** ../vim-7.4.852/src/move.c	2015-08-11 19:13:55.142175641 +0200
Karsten Hopp e7a6c0
--- src/move.c	2015-09-01 20:44:12.507720203 +0200
Karsten Hopp e7a6c0
***************
Karsten Hopp e7a6c0
*** 1732,1738 ****
Karsten Hopp e7a6c0
       * - at least 'scrolloff' lines above and below the cursor
Karsten Hopp e7a6c0
       */
Karsten Hopp e7a6c0
      validate_cheight();
Karsten Hopp e7a6c0
!     used = curwin->w_cline_height;
Karsten Hopp e7a6c0
      if (curwin->w_cursor.lnum < curwin->w_topline)
Karsten Hopp e7a6c0
  	scrolled = used;
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
--- 1732,1738 ----
Karsten Hopp e7a6c0
       * - at least 'scrolloff' lines above and below the cursor
Karsten Hopp e7a6c0
       */
Karsten Hopp e7a6c0
      validate_cheight();
Karsten Hopp e7a6c0
!     used = curwin->w_cline_height; /* includes filler lines above */
Karsten Hopp e7a6c0
      if (curwin->w_cursor.lnum < curwin->w_topline)
Karsten Hopp e7a6c0
  	scrolled = used;
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
***************
Karsten Hopp e7a6c0
*** 1751,1760 ****
Karsten Hopp e7a6c0
      new_topline = top + 1;
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
  #ifdef FEAT_DIFF
Karsten Hopp e7a6c0
!     /* count filler lines of the cursor window as context */
Karsten Hopp e7a6c0
!     i = diff_check_fill(curwin, curwin->w_cursor.lnum);
Karsten Hopp e7a6c0
!     used += i;
Karsten Hopp e7a6c0
!     extra += i;
Karsten Hopp e7a6c0
  #endif
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
      /*
Karsten Hopp e7a6c0
--- 1751,1762 ----
Karsten Hopp e7a6c0
      new_topline = top + 1;
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
  #ifdef FEAT_DIFF
Karsten Hopp e7a6c0
!     /* used already contains the number of filler lines above, don't add it
Karsten Hopp e7a6c0
!      * again.
Karsten Hopp e7a6c0
!      * TODO: if filler lines above new top are to be considered as context for
Karsten Hopp e7a6c0
!      * the current window, leave next statement commented, else hide filler
Karsten Hopp e7a6c0
!      * lines above cursor line, by adding them to extra */
Karsten Hopp e7a6c0
!     /* extra += diff_check_fill(curwin, curwin->w_cursor.lnum); */
Karsten Hopp e7a6c0
  #endif
Karsten Hopp e7a6c0
  
Karsten Hopp e7a6c0
      /*
Karsten Hopp e7a6c0
*** ../vim-7.4.852/src/version.c	2015-09-01 20:31:16.311776122 +0200
Karsten Hopp e7a6c0
--- src/version.c	2015-09-01 20:40:44.433880446 +0200
Karsten Hopp e7a6c0
***************
Karsten Hopp e7a6c0
*** 743,744 ****
Karsten Hopp e7a6c0
--- 743,746 ----
Karsten Hopp e7a6c0
  {   /* Add new patch number below this line */
Karsten Hopp e7a6c0
+ /**/
Karsten Hopp e7a6c0
+     853,
Karsten Hopp e7a6c0
  /**/
Karsten Hopp e7a6c0
Karsten Hopp e7a6c0
-- 
Karsten Hopp e7a6c0
A fool must search for a greater fool to find admiration.
Karsten Hopp e7a6c0
Karsten Hopp e7a6c0
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e7a6c0
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e7a6c0
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e7a6c0
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///