From 97c54d715b93060e8ba56032c434b95bca2c9af9 Mon Sep 17 00:00:00 2001 From: portix Date: Thu, 28 Jun 2012 21:27:51 +0200 Subject: Update dwb.state.last_tab if tab is closed --- src/view.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/view.c b/src/view.c index 6eab4991..c8b9043a 100644 --- a/src/view.c +++ b/src/view.c @@ -1041,6 +1041,9 @@ view_remove(GList *gl) { /* Get new focused tab */ GList *new_fview = dwb.state.fview; if (gl == dwb.state.fview) { + int n = g_list_position(dwb.state.views, dwb.state.fview); + if (dwb.state.last_tab > n) + dwb.state.last_tab--; if (dwb.misc.tab_position & TAB_CLOSE_POSITION_RIGHTMOST) { if (dwb.state.fview->next) { new_fview = g_list_last(dwb.state.views); -- cgit v1.2.3