summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-04-29 17:20:02 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-04-29 17:20:02 +0000
commitb8dfd6d443fe0eb19bd5b597571bc54cfe18f7b3 (patch)
tree85735d408e3d2345056badccfd85fd43f3b2c19f /usr.bin/tmux/server-fn.c
parent2b04d517c44102b6892069ec986f7d932eebd253 (diff)
Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window is killed. From Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/server-fn.c')
-rw-r--r--usr.bin/tmux/server-fn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c
index 3715df94bdc..d4406e261b3 100644
--- a/usr.bin/tmux/server-fn.c
+++ b/usr.bin/tmux/server-fn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-fn.c,v 1.55 2012/03/17 22:35:09 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.56 2012/04/29 17:20:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -263,6 +263,9 @@ server_kill_window(struct window *w)
} else
server_redraw_session_group(s);
}
+
+ if (options_get_number(&s->options, "renumber-windows"))
+ session_renumber_windows(s);
}
}