To: vim-dev@vim.org Subject: Patch 6.2.389 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.389 Problem: When working over a slow connection, it's very annoying that the last line is partly drawn and then cleared for every change. Solution: Don't redraw the bottom line if no rows were inserted or deleted. Don't draw the line if we know "@" lines will be used. Files: src/screen.c *** ../vim-6.2.388/src/screen.c Wed Mar 17 22:18:24 2004 --- src/screen.c Thu Mar 18 18:47:29 2004 *************** *** 1126,1134 **** for (;;) { wp->w_lines[idx] = wp->w_lines[j]; ! /* stop at line that didn't fit */ ! if (bot_start + row + (int)wp->w_lines[j].wl_size ! > wp->w_height) { wp->w_lines_valid = idx + 1; break; --- 1126,1135 ---- for (;;) { wp->w_lines[idx] = wp->w_lines[j]; ! /* stop at line that didn't fit, unless it is still ! * valid (no lines deleted) */ ! if (row > 0 && bot_start + row ! + (int)wp->w_lines[j].wl_size > wp->w_height) { wp->w_lines_valid = idx + 1; break; *************** *** 1633,1644 **** --fold_count; wp->w_lines[idx].wl_folded = TRUE; wp->w_lines[idx].wl_lastlnum = lnum + fold_count; ! #ifdef FEAT_SYN_HL did_update = DID_FOLD; ! #endif } else #endif { #ifdef FEAT_SEARCH_EXTRA prepare_search_hl(wp, lnum); --- 1634,1657 ---- --fold_count; wp->w_lines[idx].wl_folded = TRUE; wp->w_lines[idx].wl_lastlnum = lnum + fold_count; ! # ifdef FEAT_SYN_HL did_update = DID_FOLD; ! # endif } else #endif + if (idx < wp->w_lines_valid + && wp->w_lines[idx].wl_valid + && wp->w_lines[idx].wl_lnum == lnum + && lnum > wp->w_topline + && !(dy_flags & DY_LASTLINE) + && srow + wp->w_lines[idx].wl_size > wp->w_height) + { + /* This line is not going to fit. Don't draw anything here, + * will draw "@ " lines below. */ + row = wp->w_height + 1; + } + else { #ifdef FEAT_SEARCH_EXTRA prepare_search_hl(wp, lnum); *** ../vim-6.2.388/src/version.c Mon Mar 22 14:41:00 2004 --- src/version.c Mon Mar 22 14:43:11 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 389, /**/ -- hundred-and-one symptoms of being an internet addict: 93. New mail alarm on your palmtop annoys other churchgoers. /// 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 ///