To: vim-dev@vim.org Subject: Patch 6.2f.002 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2f.002 Problem: The output of ":ls" doesn't show whether a buffer had read errors. Solution: Add the "x" flag in the ":ls" output. Files: runtime/doc/windows.txt, src/buffer.c *** ../vim-6.2f.001/runtime/doc/windows.txt Mon May 26 22:15:10 2003 --- runtime/doc/windows.txt Mon May 26 20:19:19 2003 *************** *** 1,4 **** ! *windows.txt* For Vim version 6.2f. Last change: 2003 Apr 11 VIM REFERENCE MANUAL by Bram Moolenaar --- 1,4 ---- ! *windows.txt* For Vim version 6.2f. Last change: 2003 May 26 VIM REFERENCE MANUAL by Bram Moolenaar *************** *** 884,891 **** h a hidden buffer: It is loaded, but currently not displayed in a window |hidden-buffer| - a buffer with 'modifiable' off ! = a readonly buffer ! + a modified buffer *:bad* *:badd* :bad[d] [+lnum] {fname} --- 884,892 ---- h a hidden buffer: It is loaded, but currently not displayed in a window |hidden-buffer| - a buffer with 'modifiable' off ! = a readonly buffer ! + a modified buffer ! x a buffer with read errors *:bad* *:badd* :bad[d] [+lnum] {fname} *** ../vim-6.2f.001/src/buffer.c Mon May 26 22:15:07 2003 --- src/buffer.c Mon May 26 20:25:52 2003 *************** *** 2258,2264 **** buf_T *buf; int len; int i; - char *mod; for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next) { --- 2258,2263 ---- *************** *** 2271,2296 **** else home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE); ! switch (bufIsChanged(buf) + (buf->b_p_ro * 2) + (!buf->b_p_ma * 4)) ! { ! default: mod = " "; break; ! case 1: mod = " +"; break; ! case 2: mod = "= "; break; ! case 3: mod = "=+"; break; ! case 4: ! case 6: mod = "- "; break; ! case 5: ! case 7: mod = "-+"; break; ! } ! ! sprintf((char *)IObuff, "%3d%c%c%c%s \"", buf->b_fnum, buf->b_p_bl ? ' ' : 'u', buf == curbuf ? '%' : (curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '), buf->b_ml.ml_mfp == NULL ? ' ' : (buf->b_nwindows == 0 ? 'h' : 'a'), ! mod); len = (int)STRLEN(IObuff); STRNCPY(IObuff + len, NameBuff, IOSIZE - 20 - len); --- 2270,2286 ---- else home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE); ! sprintf((char *)IObuff, "%3d%c%c%c%c%c \"", buf->b_fnum, buf->b_p_bl ? ' ' : 'u', buf == curbuf ? '%' : (curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '), buf->b_ml.ml_mfp == NULL ? ' ' : (buf->b_nwindows == 0 ? 'h' : 'a'), ! !buf->b_p_ma ? '-' : (buf->b_p_ro ? '=' : ' '), ! (buf->b_flags & BF_READERR) ? 'x' ! : (bufIsChanged(buf) ? '+' : ' ') ! ); len = (int)STRLEN(IObuff); STRNCPY(IObuff + len, NameBuff, IOSIZE - 20 - len); *** ../vim-6.2f.001/src/version.c Mon May 26 22:15:33 2003 --- src/version.c Mon May 26 22:49:43 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 2, /**/ -- Hacker: Someone skilled in computer programming (good guy). Cracker: A hacker that uses his skills to crack software (bad guy). /// 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 ///