Hi,

On Sat, Nov 17, 2012 at 11:42:08PM +0530, Raghavendra D Prabhu wrote:
> This allows one to select the last window (not last-window but window with
> highest index), so one can bind it to 'select-window -t:$' to jump to the end
> window, and similary bind to 'select-window -t:^' to jump to the first window
> (first determined by base-index).
> 
> Signed-off-by: Raghavendra D Prabhu <rpra...@wnohang.net>
> ---
>  cmd.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/cmd.c b/cmd.c
> index 4a17ddc..35dadc1 100644
> --- a/cmd.c
> +++ b/cmd.c
> @@ -592,6 +592,16 @@ cmd_lookup_window(struct session *s, const char *name, 
> int *ambiguous)
>       if ((wl = cmd_lookup_winlink_windowid(s, name)) != NULL)
>           return (wl);
>  
> +     if (*name == '$') {
> +             if ((wlfound = RB_MAX(winlinks, &s->windows)) != NULL)
> +                     return (wlfound);
> +     }
> +
> +     if (*name == '^') {
> +             if ((wlfound = RB_MIN(winlinks, &s->windows)) != NULL)
> +                     return (wlfound);
> +     }
> +

Don't you want this check to be in cmd.c:cmd_find_window() instead?  That
way it groups logically with the other window lookup characters which can be
used.

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