Bug 240037 - Closing a tab should focus the previously selected tab
Summary: Closing a tab should focus the previously selected tab
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.4.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 250563 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-30 02:21 UTC by Daniel Hahler
Modified: 2010-11-17 16:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2010-05-30 02:21:21 UTC
Version:           2.4.3 (using KDE 4.4.3) 
OS:                Linux

Apparently Konsole selects the tab to the right when closing a tab, and wraps around to the first one when the rightmost tab gets closed.

When closing a tab, the the previously selected tab should get focused.

This is a huge usability problem, when you have multiple tabs (5+ opened) and often open and close new ones (e.g. when configuring your shell config):
the new tab gets opened at the end, and when it gets closed, you have to figure which tab you were working in before.

Reproducible: Always

Steps to Reproduce:
1. Open two tabs
2. Go to the second one
3. Open a new tab (third one), it will get focus
4. Exit the shell


Actual Results:  
The first tab is focused, not the previously selected one.


Expected Results:  
The previously selected tab (from where the new tab was opened) should have focus.

An internal stack of recently focused tabs is required (in case you close two or more tabs without opening a new one).

When such a stack is available, it would be useful to use it also for navigation: instead of only going to the left/right tab, you could cycle
Comment 1 Kurt Hindenburg 2010-05-31 04:23:05 UTC
The current method was done to mimic other KDE apps.

See:
https://bugs.kde.org/show_bug.cgi?id=183483
Comment 2 Christoph Feck 2010-05-31 12:32:46 UTC
Konqueror has an option "Activate previously used tab when closing current tab".
Comment 3 Robert Knight 2010-05-31 12:53:34 UTC
> Konqueror has an option "Activate previously used tab when
> closing current tab".

I don't see a need for making this optional.  Just implement it as the only behavior and be done with it.
Comment 4 Christoph Feck 2010-09-08 16:11:21 UTC
*** Bug 250563 has been marked as a duplicate of this bug. ***
Comment 5 Kurt Hindenburg 2010-10-15 19:41:29 UTC
SVN commit 1186295 by hindenburg:

When closing a tab, select the previously focused tab.

BUG: 240037
FIXED-IN: 4.6


 M  +1 -0      ViewContainer.cpp  
 M  +2 -7      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1186295
Comment 6 Kurt Hindenburg 2010-10-15 20:53:24 UTC
SVN commit 1186303 by hindenburg:

When closing a tab, select the previously focused tab.

Backport
CCBUG: 240037


 M  +1 -0      ViewContainer.cpp  
 M  +2 -7      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1186303
Comment 7 Daniel Hahler 2010-10-15 22:06:15 UTC
Thank you very much!

(although you might have lost a KDE contributor in the short term, because I was about to dig into KDE development to get this fixed..)

Thanks. I am very much looking forward to get this as a binary.

In case you have some easy pointers to setup Konsole development and junior jobs in the bug tracker, I'd like to join/help with development (and get this fix before the next KDE release).
Comment 8 Christoph Feck 2010-10-15 22:33:28 UTC
Daniel, why don't you start with bug 227156 where you already have some instructions how to fix it.
Comment 9 Kurt Hindenburg 2010-11-10 06:18:59 UTC
SVN commit 1194920 by hindenburg:

Remove previous commit as it cause a lot of crashes for apps using
Konsole Part.

CCBUG: 240037


 M  +0 -1      ViewContainer.cpp  
 M  +7 -2      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1194920
Comment 10 Kurt Hindenburg 2010-11-10 06:31:54 UTC
causing crashes - reverted patch 

https://bugs.kde.org/show_bug.cgi?id=246652
Comment 11 Kurt Hindenburg 2010-11-17 16:32:39 UTC
SVN commit 1198147 by hindenburg:

Recommit patch as this wasn't causing the crashes.

BUG: 240037


 M  +1 -0      ViewContainer.cpp  
 M  +2 -7      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1198147