Fix broken :yank
This commit is contained in:
parent
578a58145c
commit
d643d6ce44
@ -345,6 +345,20 @@ class CommandDispatcher(QObject):
|
||||
def yank(self, sel=False):
|
||||
"""Yank the current URL to the clipboard or primary selection.
|
||||
|
||||
Args:
|
||||
sel: True to use primary selection, False to use clipboard
|
||||
"""
|
||||
clip = QApplication.clipboard()
|
||||
url = urlutils.urlstring(self._tabs.currentWidget().url())
|
||||
mode = QClipboard.Selection if sel else QClipboard.Clipboard
|
||||
clip.setText(url, mode)
|
||||
message.info("URL yanked to {}".format("primary selection" if sel
|
||||
else "clipboard"))
|
||||
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd')
|
||||
def yank_title(self, sel=False):
|
||||
"""Yank the current title to the clipboard or primary selection.
|
||||
|
||||
Args:
|
||||
sel: True to use primary selection, False to use clipboard
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user