stig icon indicating copy to clipboard operation
stig copied to clipboard

When deleting a tab, focus the one that spawned it

Open lenormf opened this issue 4 years ago • 2 comments

Hi,

When hitting altenter to list a torrent's file, then removing the tab with d, the tab that comes next to the files list is focused.

It'd be more convenient if a reference to the previous tab that created the current one was kept, and used to make tab deletion somewhat deterministic.

Thanks!

lenormf avatar May 17 '20 09:05 lenormf

Press shift-d to close the current tab and focus the left one.

Personally, I think the current behaviour is much easier to predict. What happens if I'm on tab A, open tab B, focus tab C and close tab C? What happens if I open tab B in the background, focus tab C and close tab B without ever focusing it?

There is no visible hierarchy. If we introduce one, the user has to keep track of the hidden hierarchy to predict tab closing behaviour.

But I understand why someone would like such a feature, so ideas for an option for the tab command or a setting are welcome.

rndusr avatar May 17 '20 10:05 rndusr

What happens if I'm on tab A, open tab B, focus tab C and close tab C?

The default behaviour applies, depending on whether you use d or D. It all depends on what tab was focused when C was created, it would work exactly like a jump list in an editor.

What happens if I open tab B in the background, focus tab C and close tab B without ever focusing it?

Nothing, you're still focused on another tab.

The left/right rule for focusing upon tab deletion isn't as relevant now that we can move tabs around. So focusing the tab that created the one that we're removing beneath our feet is the best solution.

lenormf avatar May 17 '20 10:05 lenormf