To: vim-dev@vim.org Subject: Patch 6.1.045 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.045 Problem: In Visual mode, with lots of folds and 'scrolloff' set to 999, moving the cursor down near the end of the file causes the text to jump up and down. (Lubomir Host) Solution: Take into account that the cursor may be on the last line of a closed fold. Files: src/move.c *** ../vim61.044/src/move.c Sat Mar 16 16:41:26 2002 --- src/move.c Thu May 2 19:50:31 2002 *************** *** 2078,2092 **** lineoff_T boff; loff.lnum = boff.lnum = curwin->w_cursor.lnum; #ifdef FEAT_DIFF used = plines_nofill(loff.lnum); loff.fill = 0; boff.fill = 0; #else used = plines(loff.lnum); - #endif - #ifdef FEAT_FOLDING - (void)hasFolding(boff.lnum, NULL, &boff.lnum); #endif topline = loff.lnum; while (topline > 1) --- 2078,2092 ---- lineoff_T boff; loff.lnum = boff.lnum = curwin->w_cursor.lnum; + #ifdef FEAT_FOLDING + (void)hasFolding(loff.lnum, &loff.lnum, &boff.lnum); + #endif #ifdef FEAT_DIFF used = plines_nofill(loff.lnum); loff.fill = 0; boff.fill = 0; #else used = plines(loff.lnum); #endif topline = loff.lnum; while (topline > 1) *** ../vim61.044/src/version.c Wed May 1 21:20:47 2002 --- src/version.c Thu May 2 19:48:29 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 45, /**/ -- ARTHUR: But if he was dying, he wouldn't bother to carve "Aaaaarrrrrrggghhh". He'd just say it. BROTHER MAYNARD: It's down there carved in stone. GALAHAD: Perhaps he was dictating. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@moolenaar.net -- 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 ///