To: [email protected]
Subject: Patch 6.1a.018
Fcc: outbox
From: Bram Moolenaar <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 6.1a.018
Problem:    When 'scrolloff' is one and the window height is one, "gj" can put
           the cursor above the window. (Raul Segura Acevedo)
Solution:   Don't let skipcol become bigger than the cursor column.
Files:      src/move.c


*** ../vim61a.017/src/move.c    Fri Feb 22 10:30:17 2002
--- src/move.c  Thu Feb 28 21:56:00 2002
***************
*** 1144,1149 ****
--- 1144,1151 ----
       {
           /* less then 'scrolloff' lines below, increase skipcol */
           endcol = (n - curwin->w_height + 1) * width;
+           while (endcol > curwin->w_virtcol)
+               endcol -= width;
           if (endcol > curwin->w_skipcol)
               curwin->w_skipcol = endcol;
       }
*** ../vim61a.017/src/version.c Thu Feb 28 22:18:54 2002
--- src/version.c       Thu Feb 28 22:19:59 2002
***************
*** 608,609 ****
--- 608,611 ----
 {   /* Add new patch number below this line */
+ /**/
+     18,
 /**/

--
From "know your smileys":
|-P    Reaction to unusually ugly C code

///  Bram Moolenaar -- [email protected] -- http://www.moolenaar.net  \\\
///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
\\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
\\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///