To: vim-dev@vim.org Subject: Patch 6.2.373 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.373 Problem: When 'winminheight' is zero and a window is reduced to zero height, the ruler always says "Top" instead of the cursor position. (Antoine J. Mechelynck) Solution: Don't recompute w_topline for a zero-height window. Files: src/window.c *** ../vim-6.2.372/src/window.c Wed Mar 17 09:54:22 2004 --- src/window.c Wed Mar 17 19:51:54 2004 *************** *** 4141,4151 **** wp->w_height = height; wp->w_skipcol = 0; #ifdef FEAT_SCROLLBIND ! /* Don't set w_topline when 'scrollbind' is set and this isn't the current ! * window. */ ! if (!wp->w_p_scb || wp == curwin) #endif { lnum = wp->w_cursor.lnum; if (lnum < 1) /* can happen when starting up */ --- 4141,4153 ---- wp->w_height = height; wp->w_skipcol = 0; + /* Don't change w_topline when height is zero. Don't set w_topline when + * 'scrollbind' is set and this isn't the current window. */ + if (height > 0 #ifdef FEAT_SCROLLBIND ! && (!wp->w_p_scb || wp == curwin) #endif + ) { lnum = wp->w_cursor.lnum; if (lnum < 1) /* can happen when starting up */ *** ../vim-6.2.372/src/version.c Wed Mar 17 18:17:24 2004 --- src/version.c Wed Mar 17 19:56:53 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 373, /**/ -- hundred-and-one symptoms of being an internet addict: 46. Your wife makes a new rule: "The computer cannot come to bed." /// 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 ///