To: vim-dev@vim.org Subject: Patch 6.2.440 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.440 Problem: When 'lazyredraw' is set the window title is still updated. The size of the Visual area and the ruler are displayed too often. Solution: Postpone redrawing the window title. Only show the Visual area size when waiting for a character. Don't draw the ruler unnecessary. Files: src/buffer.c, src/normal.c, src/screen.c *** ../vim-6.2.439/src/buffer.c Tue Mar 30 22:17:27 2004 --- src/buffer.c Wed Mar 31 20:48:00 2004 *************** *** 2825,2830 **** --- 2825,2837 ---- char_u buf[IOSIZE]; int off; + if (!redrawing()) + { + /* Postpone updating the title when 'lazyredraw' is set. */ + need_maketitle = TRUE; + return; + } + need_maketitle = FALSE; if (!p_title && !p_icon) return; *** ../vim-6.2.439/src/normal.c Fri Mar 26 22:02:11 2004 --- src/normal.c Wed Mar 31 20:58:02 2004 *************** *** 3468,3474 **** return; #ifdef FEAT_VISUAL ! if (VIsual_active) { int i = lt(VIsual, curwin->w_cursor); long lines; --- 3468,3474 ---- return; #ifdef FEAT_VISUAL ! if (VIsual_active && !char_avail()) { int i = lt(VIsual, curwin->w_cursor); long lines; *************** *** 3614,3619 **** --- 3614,3623 ---- display_showcmd(); } + /* + * push_showcmd() and pop_showcmd() are used when waiting for the user to type + * something and there is a partial mapping. + */ void push_showcmd() { *************** *** 7666,7672 **** else curwin->w_curswant = 0; /* keep curswant at the column where we wanted to go, not where ! we ended; differs is line is too short */ curwin->w_set_curswant = FALSE; } --- 7673,7679 ---- else curwin->w_curswant = 0; /* keep curswant at the column where we wanted to go, not where ! we ended; differs if line is too short */ curwin->w_set_curswant = FALSE; } *** ../vim-6.2.439/src/screen.c Fri Apr 2 22:28:38 2004 --- src/screen.c Fri Apr 2 22:16:45 2004 *************** *** 8046,8054 **** /* If the last window has no status line, the ruler is after the mode * message and must be redrawn */ # ifdef FEAT_WINDOWS ! if (lastwin->w_status_height == 0) # endif win_redr_ruler(lastwin, TRUE); #endif redraw_cmdline = FALSE; --- 8052,8062 ---- /* If the last window has no status line, the ruler is after the mode * message and must be redrawn */ + if (redrawing() # ifdef FEAT_WINDOWS ! && lastwin->w_status_height == 0 # endif + ) win_redr_ruler(lastwin, TRUE); #endif redraw_cmdline = FALSE; *** ../vim-6.2.439/src/version.c Sun Apr 4 12:03:03 2004 --- src/version.c Sun Apr 4 12:05:15 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 440, /**/ -- hundred-and-one symptoms of being an internet addict: 260. Co-workers have to E-mail you about the fire alarm to get you out of the building. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///