diff options
-rw-r--r-- | cmd-list-keys.c | 12 | ||||
-rw-r--r-- | tmux.1 | 7 |
2 files changed, 11 insertions, 8 deletions
diff --git a/cmd-list-keys.c b/cmd-list-keys.c index f2e626a1..b0e34272 100644 --- a/cmd-list-keys.c +++ b/cmd-list-keys.c @@ -1,4 +1,4 @@ -/* $Id: cmd-list-keys.c,v 1.22 2009-11-14 17:56:39 tcunha Exp $ */ +/* $Id: cmd-list-keys.c,v 1.23 2009-11-19 22:15:58 tcunha 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); } @@ -1,4 +1,4 @@ -.\" $Id: tmux.1,v 1.200 2009-11-10 23:34:03 tcunha Exp $ +.\" $Id: tmux.1,v 1.201 2009-11-19 22:15:58 tcunha 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 , |