Fixed issue #401.

This commit is contained in:
Antoni Boucher 2015-05-30 10:37:25 -04:00
parent 6d592c7c75
commit 6ca541d359
2 changed files with 7 additions and 0 deletions

View File

@ -985,6 +985,12 @@ class CommandDispatcher:
url = objreg.get('quickmark-manager').get(name)
self._open(url, tab, bg, window)
@cmdutils.register(instance='command-dispatcher', name='select-follow', scope='window')
def select_follow(self):
"""Follow the selected text."""
widget = self._current_widget()
widget.page().currentFrame().evaluateJavaScript('window.getSelection().anchorNode.parentNode.click()')
@cmdutils.register(instance='command-dispatcher', name='inspector',
scope='window')
def toggle_inspector(self):

View File

@ -1239,6 +1239,7 @@ KEY_DATA = collections.OrderedDict([
('stop', ['<Ctrl-s>']),
('print', ['<Ctrl-Alt-p>']),
('open qute:settings', ['Ss']),
('select-follow', ['<Return>', '<Ctrl-Return>']),
])),
('insert', collections.OrderedDict([