This commit is contained in:
Kovid Goyal
2024-01-23 18:42:28 +05:30
parent c76f75a154
commit 0dfe89a817

View File

@@ -1443,8 +1443,12 @@ class Boss:
matches.append(x)
if has_sequence_match:
matches = [x for x in matches if x.is_sequence]
q = matches[-1].options.when_focus_on
matches = [x for x in matches if x.options.when_focus_on == q]
terminal_matches = [x for x in matches if not x.rest]
if terminal_matches:
matches = [terminal_matches[-1]]
else:
q = matches[-1].options.when_focus_on
matches = [x for x in matches if x.options.when_focus_on == q]
else:
matches = [matches[-1]]
return matches