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 d289ca2..36658ce 100644
--- a/trunk/options-table.c
+++ b/trunk/options-table.c
@@ -404,6 +404,10 @@ const struct options_table_entry session_options_table[] = 
{
          .type = OPTIONS_TABLE_FLAG,
          .default_num = 0
        },
+       { .name = "automatic-renumber-windows",
+         .type = OPTIONS_TABLE_FLAG,
+         .default_num = 0
+       },
 
        { .name = NULL }
 };
diff --git a/trunk/server-fn.c b/trunk/server-fn.c
index 15d5477..655d989 100644
--- a/trunk/server-fn.c
+++ b/trunk/server-fn.c
@@ -262,6 +262,11 @@ server_kill_window(struct window *w)
                        } else
                                server_redraw_session_group(s);
                }
+
+               /* Renumber all windows if we've been asked to. */
+               if (options_get_number(&s->options,
+                               "automatic-renumber-windows"))
+                       window_renumber_windows(s);
        }
 }
 
-- 
1.7.5.4

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to