Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previous (in history) tab is not opened after an editor tab is closed #2488

Closed
nomadbyte opened this issue Apr 28, 2020 · 7 comments
Closed

Comments

@nomadbyte
Copy link
Contributor

nomadbyte commented Apr 28, 2020

geany 1.36 (git >= 825acb21) (built on 2020-04-28 with GTK 3.22.30, GLib 2.56.4)

When Editor has multiple tabs, closing a given tab does not open the previous (in viewing/location history). Instead it opens a next (to the right) tab from the closed one, or a previous (to the left) if there's no next.

This is somewhat disorienting, especially if there're many tabs opened. I'm expecting to be back to the previously viewed file. The previous location is tracked in history, so it should be available to decide which tab to jump to after closing the current one.

@elextr
Copy link
Member

elextr commented Apr 28, 2020

Menu -> Edit -> Preferences -> Interface -> Notebook Tabs -> Switch to last used document after closing tab

@elextr elextr closed this as completed Apr 28, 2020
@nomadbyte
Copy link
Contributor Author

nomadbyte commented Apr 29, 2020

Thanks. What is the reason for this not to be a default behavior?

@elextr
Copy link
Member

elextr commented Apr 29, 2020

The change was in a commit immediately after one that said "I won't make an option" but the series doesn't have a PR or issue reference and my quick search found nothing relevant, so I guess there is no record of why it went from no option to not the default.

@elextr
Copy link
Member

elextr commented Apr 29, 2020

PS, Maybe its because its the way browsers do it??

@nomadbyte
Copy link
Contributor Author

It's certainly good that it's configurable, at least that the history behavior could be enabled.

However, it would make sense to reverse the default, based on the "least surprise" UI rule. This is especially apparent while using Version Control (or any other plugin that opens some transient editor tabs). Say, requesting a Diff for a current file opens up a new tab; once done viewing the Diff, the tab is closed; then logically, the view should return to the requesting tab. Opening a whatever adjacent tab does not seem to fit into the intent flow, and indeed just "pollutes" the intra-tab location history.

Perhaps, I'm not much accustomed to Geany to notice things like this, but that's my new user experience.

It may be different with a web-browser, as it usually does not track intra-tab history. Still, Firefox, for example, will create a new tab at the end of stack, but on closing would get back to the "intiator" tab.

@elextr
Copy link
Member

elextr commented Apr 29, 2020

Still, Firefox, for example, will create a new tab at the end of stack, but on closing would get back to the "intiator" tab.

Doesn't here (nor does chrome), maybe an option somewhere (like Geany :)

Personally I don't mind which is default, but maybe somebody can come up with an explanation, its been this way since 2011 so a bit longer won't hurt :)

@nomadbyte
Copy link
Contributor Author

nomadbyte commented Apr 29, 2020

Doesn't here (nor does chrome), maybe an option somewhere (like Geany :)

I'm running a vanilla Ubuntu 18.04 on this box, Firefox 75, here from this window I click on + to add a new tab, it opens up at the very end of my "millions" of opened tabs; I click on whatever bookmark to browse in the new tab. When I close that tab, I'm back to typing this. No searching/scrolling through the list of the tabs.

Not a biggie, of course. I'd say the default change would affect mostly new users/installs. Those that only update the version would just reload the saved configuration, right? I won't be surprised if most users have this option On already, provided they're aware of the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants