Hi,

* On Sat, Nov 17, 2012 at 06:22:38PM +0000, Thomas Adam <tho...@xteddy.org> 
wrote:
+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


You are right, I will move it there.




Regards,
--
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net

Attachment: pgpXx0zVYnACf.pgp
Description: PGP signature

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to