Make :follow-hint take a keystring.
This commit is contained in:
parent
c1c5b0f2b4
commit
9cfd96fcef
@ -788,7 +788,7 @@ How many steps to zoom out.
|
|||||||
|<<completion-item-prev,completion-item-prev>>|Select the previous completion item.
|
|<<completion-item-prev,completion-item-prev>>|Select the previous completion item.
|
||||||
|<<drop-selection,drop-selection>>|Drop selection and keep selection mode enabled.
|
|<<drop-selection,drop-selection>>|Drop selection and keep selection mode enabled.
|
||||||
|<<enter-mode,enter-mode>>|Enter a key mode.
|
|<<enter-mode,enter-mode>>|Enter a key mode.
|
||||||
|<<follow-hint,follow-hint>>|Follow the currently selected hint.
|
|<<follow-hint,follow-hint>>|Follow a hint.
|
||||||
|<<follow-selected,follow-selected>>|Follow the selected text.
|
|<<follow-selected,follow-selected>>|Follow the selected text.
|
||||||
|<<leave-mode,leave-mode>>|Leave the mode we're currently in.
|
|<<leave-mode,leave-mode>>|Leave the mode we're currently in.
|
||||||
|<<message-error,message-error>>|Show an error message in the statusbar.
|
|<<message-error,message-error>>|Show an error message in the statusbar.
|
||||||
@ -877,7 +877,12 @@ Enter a key mode.
|
|||||||
|
|
||||||
[[follow-hint]]
|
[[follow-hint]]
|
||||||
=== follow-hint
|
=== follow-hint
|
||||||
Follow the currently selected hint.
|
Syntax: +:follow-hint ['keystring']+
|
||||||
|
|
||||||
|
Follow a hint.
|
||||||
|
|
||||||
|
==== positional arguments
|
||||||
|
* +'keystring'+: The hint to follow.
|
||||||
|
|
||||||
[[follow-selected]]
|
[[follow-selected]]
|
||||||
=== follow-selected
|
=== follow-selected
|
||||||
|
@ -947,11 +947,18 @@ class HintManager(QObject):
|
|||||||
handler()
|
handler()
|
||||||
|
|
||||||
@cmdutils.register(instance='hintmanager', scope='tab', hide=True)
|
@cmdutils.register(instance='hintmanager', scope='tab', hide=True)
|
||||||
def follow_hint(self):
|
def follow_hint(self, keystring=None):
|
||||||
"""Follow the currently selected hint."""
|
"""Follow a hint.
|
||||||
if not self._context.to_follow:
|
|
||||||
raise cmdexc.CommandError("No hint to follow")
|
Args:
|
||||||
self.fire(self._context.to_follow, force=True)
|
keystring: The hint to follow, or None.
|
||||||
|
"""
|
||||||
|
if keystring is None:
|
||||||
|
if self._context.to_follow is None:
|
||||||
|
raise cmdexc.CommandError("No hint to follow")
|
||||||
|
else:
|
||||||
|
keystring = self._context.to_follow
|
||||||
|
self.fire(keystring, force=True)
|
||||||
|
|
||||||
@pyqtSlot('QSize')
|
@pyqtSlot('QSize')
|
||||||
def on_contents_size_changed(self, _size):
|
def on_contents_size_changed(self, _size):
|
||||||
|
Loading…
Reference in New Issue
Block a user