[PATCH 0/4] Add support for renumbering windows

2011-08-04 Thread Thomas Adam
Hi, These patches represent a very short (~30 minute) hack I did for tmux because it annoyed me enough I wanted to try and fix it. :) I make use a of "new-window -a" a lot, and as such over time when windows are created and removed, large "gaps" between the winlink indexes are created, which can

[PATCH 1/4] Add cmd-renumber-windows definition

2011-08-04 Thread Thomas Adam
This adds the definition file for the renumber-windows command, as well as supporting its addition in the Makefile. --- trunk/Makefile.am|1 + trunk/cmd-renumber-windows.c | 53 ++ trunk/cmd.c |1 + trunk/tmux.h

[PATCH 2/4] Add definition for window_renumber_windows

2011-08-04 Thread Thomas Adam
This is responsible for reassigning new index numbers to the winlinks in a given session. --- trunk/tmux.h |1 + trunk/window.c | 27 +++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/trunk/tmux.h b/trunk/tmux.h index b118f49..3881bd2 100644 --- a/

[PATCH 3/4] Add "automatic-renumber-windows" session option

2011-08-04 Thread Thomas Adam
A given session can always be told to renumber its winlinks when a window is destroyed in that session. --- trunk/options-table.c |4 trunk/server-fn.c |5 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/trunk/options-table.c b/trunk/options-table.c index d289

[PATCH 4/4] Add docs for automatic-renumber-windows, etc.

2011-08-04 Thread Thomas Adam
This updates the tmux manpage for the automatic-renumber-windows session option and the renumber-windows command. --- trunk/tmux.1 | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/trunk/tmux.1 b/trunk/tmux.1 index a5484c5..6b4a96b 100644 --- a/trunk/tmu

Kill all windows in session but one...

2011-08-04 Thread Thomas Adam
Hi, I often find myself starting up a new session in tmux with the intent of it being for a specific purpose, and naming it as such with "rename-session". But in the course of me doing that, I often end up opening several windows, all of which are a means to an end, and quickly need to go, as I th