To: vim-dev@vim.org Subject: Patch 6.2.449 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.449 (after 6.2.431) Problem: Get error messages when switching files. Solution: Check for a valid line number when calculating the width of the horizontal scrollbar. (Helmut Stiegler) Files: src/gui.c *** ../vim-6.2.448/src/gui.c Fri Apr 2 22:33:55 2004 --- src/gui.c Mon Apr 5 15:36:13 2004 *************** *** 3887,3894 **** { value = curwin->w_leftcol; ! /* Calculate maximum for horizontal scrollbar. */ ! if (vim_strchr(p_go, GO_HORSCROLL) == NULL) { linenr_T lnum; colnr_T n; --- 3887,3899 ---- { value = curwin->w_leftcol; ! /* Calculate maximum for horizontal scrollbar. Check for reasonable ! * line numbers, topline and botline can be invalid when displaying is ! * postponed. */ ! if (vim_strchr(p_go, GO_HORSCROLL) == NULL ! && curwin->w_topline <= curwin->w_cursor.lnum ! && curwin->w_botline > curwin->w_cursor.lnum ! && curwin->w_botline <= curbuf->b_ml.ml_line_count + 1) { linenr_T lnum; colnr_T n; *** ../vim-6.2.448/src/version.c Mon Apr 5 19:41:32 2004 --- src/version.c Mon Apr 5 19:43:45 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 449, /**/ -- press CTRL-ALT-DEL for more information /// 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 ///