From: lum Date: Fri, 26 Mar 2021 15:02:10 +0000 (+0000) Subject: Invert the 'R' indicator which seems rather unintuitive at the moment, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e40a04c8ca033e74c54ab44187d60b42ac593374;p=openbsd Invert the 'R' indicator which seems rather unintuitive at the moment, currently a '*' next to a file's name indicates it is writable. With this diff it now means it is read-only. Also make the active buffer indicator more visible:'.'->'>'. --- diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index a5b245a745b..410d8ede0c2 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.111 2021/03/23 18:40:29 lum Exp $ */ +/* $OpenBSD: buffer.c,v 1.112 2021/03/26 15:02:10 lum Exp $ */ /* This file is in the public domain. */ @@ -368,9 +368,9 @@ makelist(void) } if (addlinef(blp, "%c%c%c %-*.*s%c%-6d %-*s", - (bp == curbp) ? '.' : ' ', /* current buffer ? */ + (bp == curbp) ? '>' : ' ', /* current buffer ? */ ((bp->b_flag & BFCHG) != 0) ? '*' : ' ', /* changed ? */ - ((bp->b_flag & BFREADONLY) != 0) ? ' ' : '*', + ((bp->b_flag & BFREADONLY) != 0) ? '*' : ' ', w - 5, /* four chars already written */ w - 5, /* four chars already written */ bp->b_bname, /* buffer name */ diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1 index 29066df6ea7..a5a7f9aae45 100644 --- a/usr.bin/mg/mg.1 +++ b/usr.bin/mg/mg.1 @@ -1,7 +1,7 @@ -.\" $OpenBSD: mg.1,v 1.121 2021/03/20 09:00:49 lum Exp $ +.\" $OpenBSD: mg.1,v 1.122 2021/03/26 15:02:10 lum Exp $ .\" This file is in the public domain. .\" -.Dd $Mdocdate: March 20 2021 $ +.Dd $Mdocdate: March 26 2021 $ .Dt MG 1 .Os .Sh NAME @@ -692,6 +692,11 @@ directory. Toggle whether the line number is displayed in the modeline. .It list-buffers Display the list of available buffers. +The first column in the output indicates which buffer is active with a '>' +character. +The second column indicates which buffers are modified. +The third column indicates which buffers are read-only. +The remaining columns are self-explanatory. .It load Prompt the user for a filename, and then execute commands from that file.