Yeah this is a bug, try this:

Index: server-fn.c
===================================================================
RCS file: /cvsroot/tmux/tmux/server-fn.c,v
retrieving revision 1.108
diff -u -p -r1.108 server-fn.c
--- server-fn.c 2 Jul 2010 02:45:52 -0000       1.108
+++ server-fn.c 1 Aug 2010 18:39:26 -0000
@@ -281,7 +281,7 @@ server_link_window(struct session *src,
                dstwl = winlink_find_by_index(&dst->windows, dstidx);
        if (dstwl != NULL) {
                if (dstwl->window == srcwl->window)
-                       return (0);
+                       return (-1);
                if (killflag) {
                        /*
                         * Can't use session_detach as it will destroy session



On Sun, Aug 01, 2010 at 07:52:36PM +0200, Christian Neukirchen wrote:
> Hi,
> 
> If you pass the same arguments to -s and -t in move-window, the window
> gets closed.  I expected nothing to happen.
> 
> I found this writing
> 
> #!/bin/sh
> # tmux-compress - renumber tmux windows in sequence.
> 
> tmux lsw |
> awk -F: '/^[0-9]+/ { if ($1 != ++i) print "tmux move-window -s " $1 " -t " i 
> }' |
> sh
> 
> ...which would be a nice core function too.
> 
> Thanks,
> -- 
> Christian Neukirchen  <chneukirc...@gmail.com>  http://chneukirchen.org
> 
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to