To: vim-dev@vim.org Subject: Patch 6.1.090 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.090 Problem: CTRL-F gets stuck when 'scrolloff' is non-zero and there is a mix of long wrapping lines and a non-wrapping line. Solution: Check that CTRL-F scrolls at least one line. Files: src/move.c *** ../vim61.089/src/move.c Sat May 11 20:33:53 2002 --- src/move.c Sun Jun 9 14:43:34 2002 *************** *** 2281,2286 **** --- 2281,2287 ---- long n; int retval = OK; lineoff_T loff; + linenr_T old_topline = curwin->w_topline; if (curbuf->b_ml.ml_line_count == 1) /* nothing to do */ { *************** *** 2461,2469 **** --- 2462,2477 ---- /* * Avoid the screen jumping up and down when 'scrolloff' is non-zero. + * But make sure we scroll at least one line (happens with mix of long + * wrapping lines and non-wrapping line). */ if (dir == FORWARD && check_top_offset()) + { scroll_cursor_top(1, FALSE); + if (curwin->w_topline <= old_topline + && old_topline < curbuf->b_ml.ml_line_count) + curwin->w_topline = old_topline + 1; + } redraw_later(VALID); return retval; *** ../vim61.089/src/version.c Sat Jun 8 19:05:54 2002 --- src/version.c Sun Jun 9 14:45:58 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 90, /**/ -- hundred-and-one symptoms of being an internet addict: 139. You down your lunch in five minutes, at your desk, so you can spend the rest of the hour surfing the Net. /// 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 ///