summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/view.c')
-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);