diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-18 10:18:26 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-18 10:18:26 +0000 |
commit | 7c16973fb374e8a416cc404e2bd93e7d9eca4ec1 (patch) | |
tree | d58474fbbe2a8029a3803efde3c05978e5b94c6e | |
parent | 7f261868429894b4a1c02e3ba5bab76733c86897 (diff) |
Mark -n keys with (no prefix) rather than [].
-rw-r--r-- | usr.bin/tmux/cmd-list-keys.c | 12 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 7 |
2 files changed, 11 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c index 70847ca8d81..bd728a8b462 100644 --- a/usr.bin/tmux/cmd-list-keys.c +++ b/usr.bin/tmux/cmd-list-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-keys.c,v 1.9 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-list-keys.c,v 1.10 2009/11/18 10:18:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -71,13 +71,15 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_ctx *ctx) key = key_string_lookup_key(bd->key & ~KEYC_PREFIX); if (key == NULL) continue; - if (!(bd->key & KEYC_PREFIX)) - used = xsnprintf(tmp, sizeof tmp, "[%s]: ", key); - else - used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key); + used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key); if (used >= sizeof tmp) continue; + if (!(bd->key & KEYC_PREFIX)) { + used = strlcat(tmp, "(no prefix) ", sizeof tmp); + if (used >= sizeof tmp) + continue; + } cmd_list_print(bd->cmdlist, tmp + used, (sizeof tmp) - used); ctx->print(ctx, "%s", tmp); } diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 9314debbe1d..8e74a3026a6 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.118 2009/11/10 18:53:11 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.119 2009/11/18 10:18:25 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 10 2009 $ +.Dd $Mdocdate: November 18 2009 $ .Dt TMUX 1 .Os .Sh NAME @@ -1114,7 +1114,8 @@ are printed. Keys bound without the prefix key (see .Ic bind-key .Fl n ) -are enclosed in square brackets. +are marked with +.Ql (no prefix) . .Pp With .Fl t , |