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
Opening internal pages in a new tab vs. current tab #4821
Comments
Check out
|
sure... but in my opinion, the default behaviour should be the same, no matter, if current tab or not... |
I also find this kind of annoying. Is this OK to fix? Should we default to new tab or same tab? |
I'd say:
Let me know what you think! |
Sounds reasonable to me. |
I'm taking a look at this. Some commands, like diff --git a/qutebrowser/misc/utilcmds.py b/qutebrowser/misc/utilcmds.py
index 8c2462b2b..258145635 100644
--- a/qutebrowser/misc/utilcmds.py
+++ b/qutebrowser/misc/utilcmds.py
@@ -260,15 +260,19 @@ def window_only(current_win_id: int) -> None:
@cmdutils.register()
@cmdutils.argument('win_id', value=cmdutils.Value.win_id)
-def version(win_id: int, paste: bool = False) -> None:
+def version(win_id: int, tab: bool = False, bg: bool = False, window: bool = False,
+ paste: bool = False) -> None:
"""Show version information.
Args:
+ tab: Open in a new tab.
+ bg: Open in a background tab.
+ window: Open in a new window.
paste: Paste to pastebin.
"""
- tabbed_browser = objreg.get('tabbed-browser', scope='window',
- window=win_id)
- tabbed_browser.load_url(QUrl('qute://version/'), newtab=True)
+ command_dispatcher = objreg.get('command-dispatcher', scope='window',
+ window=win_id, from_command=True)
+ command_dispatcher._open(QUrl('qute://version/'), tab, bg, window)
if paste:
pastebin_version() |
@lufte I'd like to avoid commands calling other commands, except in places where such a command is actually coming from an user (such as I'd rather move the logic from |
Ah, yes, I remember seeing #150 but I didn't know about #1129. What do you mean by commands calling other commands though? This change only means that new commands would be making use of This particular issue could still be solved by updating the small set of commands that open a new tab by default and make them support |
My preference would be that the default is opening in a new tab. When I run |
A detail, that caught my attention is, that
:version
opens in a new tab while:messages
and:set
opens in the current tab.Would be nice, if this would be consistent across all such commands.
The text was updated successfully, but these errors were encountered: