Hi,

On Sat, Nov 17, 2012 at 11:42:06PM +0530, Raghavendra D Prabhu wrote:
> The characters used in choice-mode are hardcoded. This option allows one to 
> use
> custom characters (and order) based on one's preference. Also, added 
> description
> to the man page.
> 
> Signed-off-by: Raghavendra D Prabhu <rpra...@wnohang.net>
> ---
>  options-table.c |  7 +++++++
>  tmux.1          |  2 ++
>  window-choose.c | 13 ++++++-------
>  3 files changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/options-table.c b/options-table.c
> index 8ce838a..c2ef30c 100644
> --- a/options-table.c
> +++ b/options-table.c
> @@ -108,6 +108,13 @@ const struct options_table_entry session_options_table[] 
> = {
>         .default_num = 0
>       },
>  
> +     { .name = "choice-characters",
> +       .type = OPTIONS_TABLE_STRING,
> +       .default_str = "0123456789"
> +                      "abcdefghijklmnopqrstuvwxyz"
> +                      "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> +     },
> +

This ability breaks how choice-mode then goes on to number other items once
the choice-characters have been used up.  Since the behaviour is to keep
numbering the entries after the last one, if you do:

set -g choice-characters "1 3 0 9 2"

amd then look at, say, choose-tree, you'll find the sequence very strange
indeed.  Not to mention you cannot guarantee, even with the ordering here,
that you'll never get duplicate entries, making the entire point of pressing
a letter to go to a key-binding redundant.

Hmm... so I wonder now, whether this is worth it.  The assignment of letters
and numbers here, to denote the items which you can select with a
key-binding is always deterministic, and if you go beyond the default, then
you're prompted for selection anyway.

Why is this patch useful to you, out of interest?

-- Thomas Adam

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to