We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7866986 commit 76d014eCopy full SHA for 76d014e
prompt_toolkit/key_binding/input_processor.py
@@ -148,9 +148,12 @@ def _process(self):
148
is_prefix_of_longer_match = self._is_prefix_of_longer_match(buffer)
149
matches = self._get_matches(buffer)
150
151
- # When longer matches were found, but the current match is
152
- # 'eager', ignore all the longer matches.
153
- if matches and matches[-1].eager(self._cli_ref()):
+ # When eager matches were found, give priority to them and also
+ # ignore all the longer matches.
+ eager_matches = [m for m in matches if m.eager(self._cli_ref())]
154
+
155
+ if eager_matches:
156
+ matches = eager_matches
157
is_prefix_of_longer_match = False
158
159
# Exact matches found, call handler.
0 commit comments