To: vim-dev@vim.org Subject: Patch 6.1.371 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.371 Problem: "%V" in 'statusline' doesn't show "0-1" in an empty line. Solution: Add one to the column when comparing with virtual column (Andrew Pimlott) Files: src/buffer.c *** ../vim61.370/src/buffer.c Sat Mar 8 20:33:31 2003 --- src/buffer.c Sat Mar 8 16:59:52 2003 *************** *** 3184,3195 **** getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL); wp->w_p_list = TRUE; } /* Don't display %V if it's the same as %c. */ if (opt == STL_VIRTCOL_ALT && (virtcol == (colnr_T)(!(State & INSERT) && empty_line ! ? 0 : (int)wp->w_cursor.col))) break; ! num = (long)virtcol + 1; break; case STL_PERCENTAGE: --- 3201,3213 ---- getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL); wp->w_p_list = TRUE; } + ++virtcol; /* Don't display %V if it's the same as %c. */ if (opt == STL_VIRTCOL_ALT && (virtcol == (colnr_T)(!(State & INSERT) && empty_line ! ? 0 : (int)wp->w_cursor.col + 1))) break; ! num = (long)virtcol; break; case STL_PERCENTAGE: *** ../vim61.370/src/version.c Sun Mar 9 14:19:20 2003 --- src/version.c Sun Mar 9 14:22:48 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 371, /**/ -- I learned the customs and mannerisms of engineers by observing them, much the way Jane Goodall learned about the great apes, but without the hassle of grooming. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///