Sync OpenBSD patchset 545:

Mark -n keys with (no prefix) rather than [].
This commit is contained in:
Tiago Cunha 2009-11-19 22:15:58 +00:00
parent ec48709dc2
commit 8777a809dc
2 changed files with 11 additions and 8 deletions

View File

@ -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> * 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); key = key_string_lookup_key(bd->key & ~KEYC_PREFIX);
if (key == NULL) if (key == NULL)
continue; continue;
if (!(bd->key & KEYC_PREFIX)) used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key);
used = xsnprintf(tmp, sizeof tmp, "[%s]: ", key);
else
used = xsnprintf(tmp, sizeof tmp, "%*s: ", width, key);
if (used >= sizeof tmp) if (used >= sizeof tmp)
continue; 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); cmd_list_print(bd->cmdlist, tmp + used, (sizeof tmp) - used);
ctx->print(ctx, "%s", tmp); ctx->print(ctx, "%s", tmp);
} }

7
tmux.1
View File

@ -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> .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\" .\"
@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" 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 .Dt TMUX 1
.Os .Os
.Sh NAME .Sh NAME
@ -1114,7 +1114,8 @@ are printed.
Keys bound without the prefix key (see Keys bound without the prefix key (see
.Ic bind-key .Ic bind-key
.Fl n ) .Fl n )
are enclosed in square brackets. are marked with
.Ql (no prefix) .
.Pp .Pp
With With
.Fl t , .Fl t ,