tmux move-window behavior changed

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tmux move-window behavior changed

Lévai, Dániel
Hi!

Suddenly I realized that I can not move a window to a non-existing (new)
window number? Like if I have windows at [0:mutt 1:ksh], I can not do
`move-window -s 1 -t 8' anymore, it just stays at 1. This had to work
before. Am I just being silly?


Daniel

Reply | Threaded
Open this post in threaded view
|

Re: tmux move-window behavior changed

Theo Buehler
On Tue, Apr 21, 2015 at 03:55:26PM +0200, LÉVAI Dániel wrote:

> Hi!
>
> Suddenly I realized that I can not move a window to a non-existing (new)
> window number? Like if I have windows at [0:mutt 1:ksh], I can not do
> `move-window -s 1 -t 8' anymore, it just stays at 1. This had to work
> before. Am I just being silly?
>
>
> Daniel
>

I see the same thing.  This was broken by this recent commit:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tmux/server-fn.c?rev=1.81&content-type=text/x-cvsweb-markup

The following patch seems to fix the issue for me, but I'm not sure if
the more involved logic as in server_kill_window() (lines 282ff) should
be followed:


Index: server-fn.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/server-fn.c,v
retrieving revision 1.81
diff -u -p -r1.81 server-fn.c
--- server-fn.c 19 Apr 2015 21:46:52 -0000 1.81
+++ server-fn.c 21 Apr 2015 14:19:53 -0000
@@ -351,7 +351,8 @@ server_unlink_window(struct session *s,
  server_destroy_session_group(s);
  else
  server_redraw_session_group(s);
- session_renumber_windows(s);
+ if (options_get_number(&s->options, "renumber-windows"))
+ session_renumber_windows(s);
 }
 
 void

Reply | Threaded
Open this post in threaded view
|

Re: tmux move-window behavior changed

Nicholas Marriott-2
In reply to this post by Lévai, Dániel
 I have another fix for this which I will probably apply when I get home.

Cheers

-------- Original message --------
From: Theo Buehler <[hidden email]>
Date:21/04/2015  15:28  (GMT+00:00)
To: [hidden email]
Cc: [hidden email]
Subject: Re: tmux move-window behavior changed

On Tue, Apr 21, 2015 at 03:55:26PM +0200, LÉVAI Dániel wrote:

> Hi!
>
> Suddenly I realized that I can not move a window to a non-existing (new)
> window number? Like if I have windows at [0:mutt 1:ksh], I can not do
> `move-window -s 1 -t 8' anymore, it just stays at 1. This had to work
> before. Am I just being silly?
>
>
> Daniel
>

I see the same thing.  This was broken by this recent commit:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/tmux/server-fn.c?rev=1.81&content-type=text/x-cvsweb-markup

The following patch seems to fix the issue for me, but I'm not sure if
the more involved logic as in server_kill_window() (lines 282ff) should
be followed:


Index: server-fn.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/server-fn.c,v
retrieving revision 1.81
diff -u -p -r1.81 server-fn.c
--- server-fn.c 19 Apr 2015 21:46:52 -0000 1.81
+++ server-fn.c 21 Apr 2015 14:19:53 -0000
@@ -351,7 +351,8 @@ server_unlink_window(struct session *s,
server_destroy_session_group(s);
else
server_redraw_session_group(s);
- session_renumber_windows(s);
+ if (options_get_number(&s->options, "renumber-windows"))
+ session_renumber_windows(s);
}

void