To: vim-dev@vim.org Subject: Patch 6.0.072 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.072 Problem: When 'lazyredraw' is set, a mapping that stops Visual mode, moves the cursor and starts Visual mode again causes a redraw problem. (Brian Silverman) Solution: Redraw both the old and the new Visual area when necessary. Files: src/normal.c, src/screen.c *** ../vim60.71/src/normal.c Sun Nov 4 13:19:04 2001 --- src/normal.c Sun Nov 4 19:03:27 2001 *************** *** 6491,6499 **** clip_star.vmode = NUL; #endif ! /* Only need to redraw this line. */ ! curwin->w_old_cursor_lnum = curwin->w_cursor.lnum; ! curwin->w_old_visual_lnum = curwin->w_cursor.lnum; } #endif /* FEAT_VISUAL */ --- 6491,6503 ---- clip_star.vmode = NUL; #endif ! /* Only need to redraw this line, unless still need to redraw an old ! * Visual area (when 'lazyredraw' is set). */ ! if (curwin->w_redr_type < INVERTED) ! { ! curwin->w_old_cursor_lnum = curwin->w_cursor.lnum; ! curwin->w_old_visual_lnum = curwin->w_cursor.lnum; ! } } #endif /* FEAT_VISUAL */ *** ../vim60.71/src/screen.c Thu Nov 1 14:59:19 2001 --- src/screen.c Sun Nov 4 19:06:14 2001 *************** *** 1171,1176 **** --- 1171,1180 ---- from = wp->w_old_cursor_lnum; if (wp->w_old_cursor_lnum > to) to = wp->w_old_cursor_lnum; + if (wp->w_old_visual_lnum < from) + from = wp->w_old_visual_lnum; + if (wp->w_old_visual_lnum > to) + to = wp->w_old_visual_lnum; } else { *** ../vim60.71/src/version.c Sun Nov 4 18:45:17 2001 --- src/version.c Sun Nov 4 19:08:13 2001 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 72, /**/ -- For humans, honesty is a matter of degree. Engineers are always honest in matters of technology and human relationships. That's why it's a good idea to keep engineers away from customers, romantic interests, and other people who can't handle the thruth. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim ))) \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///