Mark -n keys with (no prefix) rather than [].

This commit is contained in:
Nicholas Marriott 2009-11-18 10:18:25 +00:00
parent a9ca8df8e3
commit 68f5c9c72d
2 changed files with 8 additions and 5 deletions

View File

@ -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);
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);
}

3
tmux.1
View File

@ -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 ,