Add bindings for xo/xO (backtabopen(cur))

This commit is contained in:
Florian Bruhin 2014-05-09 12:10:03 +02:00
parent 2b630555db
commit 4361220a48
3 changed files with 8 additions and 6 deletions

6
TODO
View File

@ -361,12 +361,6 @@ Show and execute userscripts (command execute_userscript).
Other Other
----- -----
xo
Open url in a new tab in background, the argument $URI will be repaced with the current uri (command: backopen, aliases: bopen ).
xO
Open url in a new tab in background, set current url in the navigation bar (command: backopen_url).
wo wo
Open url in a new instance (command: winopen, aliases: wopen, w). Open url in a new instance (command: winopen, aliases: wopen, w).

View File

@ -545,6 +545,8 @@ DATA = OrderedDict([
('go', 'opencur'), ('go', 'opencur'),
('O', 'tabopen'), ('O', 'tabopen'),
('gO', 'tabopencur'), ('gO', 'tabopencur'),
('xo', 'backtabopen'),
('xO', 'backtabopencur'),
('ga', 'tabopen about:blank'), ('ga', 'tabopen about:blank'),
('d', 'tabclose'), ('d', 'tabclose'),
('co', 'only'), ('co', 'only'),

View File

@ -282,6 +282,12 @@ class TabbedBrowser(TabWidget):
url = urlutils.urlstring(self.currentWidget().url()) url = urlutils.urlstring(self.currentWidget().url())
message.set_cmd_text(':open ' + url) message.set_cmd_text(':open ' + url)
@cmdutils.register(instance='mainwindow.tabs', hide=True)
def backtabopencur(self):
"""Set the statusbar to :backtabopen and the current URL."""
url = urlutils.urlstring(self.currentWidget().url())
message.set_cmd_text(':backtabopen ' + url)
@cmdutils.register(instance='mainwindow.tabs', name='undo') @cmdutils.register(instance='mainwindow.tabs', name='undo')
def undo_close(self): def undo_close(self):
"""Switch to the previous tab, or skip [count] tabs. """Switch to the previous tab, or skip [count] tabs.