summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-06-28 21:27:51 +0200
committerportix <none@none>2012-06-28 21:27:51 +0200
commit97c54d715b93060e8ba56032c434b95bca2c9af9 (patch)
tree709357e8eb61c5d10f29aa45bd88a1ad164ea5eb /src
parent065c11877fd7221726ebfcda5a5201bdc374f604 (diff)
downloaddwb-97c54d715b93060e8ba56032c434b95bca2c9af9.zip
Update dwb.state.last_tab if tab is closed
Diffstat (limited to 'src')
-rw-r--r--src/view.c3
1 files changed, 3 insertions, 0 deletions
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);