To: vim-dev@vim.org Subject: Patch 6.2.363 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.363 Problem: In an empty file with 'showmode' off, "i" doesn't change the ruler from "0-1" to "1". Typing "x" does show "1", but then doesn't make it "0-1" again. Same problem for ruler in statusline. (Andrew Pimlott) Solution: Remember the "empty line" flag with Insert mode and'ed to it. Files: src/screen.c *** ../vim-6.2.362/src/screen.c Mon Mar 15 12:26:21 2004 --- src/screen.c Tue Mar 16 15:35:17 2004 *************** *** 8207,8215 **** #endif /* ! * Check if the line is empty (will show "0-1"). */ ! if (*ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE) == NUL) empty_line = TRUE; /* --- 8207,8216 ---- #endif /* ! * Check if not in Insert mode and the line is empty (will show "0-1"). */ ! if (!(State & INSERT) ! && *ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE) == NUL) empty_line = TRUE; /* *************** *** 8271,8280 **** ? 0L : (long)(wp->w_cursor.lnum)); col_print(buffer + STRLEN(buffer), ! !(State & INSERT) && empty_line ! ? 0 ! : (int)wp->w_cursor.col + 1, ! (int)virtcol + 1); /* * Add a "50%" if there is room for it. --- 8272,8279 ---- ? 0L : (long)(wp->w_cursor.lnum)); col_print(buffer + STRLEN(buffer), ! empty_line ? 0 : (int)wp->w_cursor.col + 1, ! (int)virtcol + 1); /* * Add a "50%" if there is room for it. *** ../vim-6.2.362/src/version.c Tue Mar 16 14:13:41 2004 --- src/version.c Tue Mar 16 15:34:00 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 363, /**/ -- hundred-and-one symptoms of being an internet addict: 35. Your husband tells you he's had the beard for 2 months. /// 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 ///