-
Notifications
You must be signed in to change notification settings - Fork 28
sync_selections + pattern_as_selection = infinite loop #86
Copy link
Copy link
Open
Labels
Description
There are two main mechanisms in the code to prevent indefinite looping:
-
The check in line 456 prevents indefinite loop that primary selection and clipboard keep synchronizing with each other.
-
The check in line 433 prevents indefinite loop that a selection (either primary or clipboard) keeps updating itself. The ignore_next flag also helps, but it's not required.
The issue is that the first check doesn't work when both sync_selections and pattern_as_selection are true. The check should be against matched text, instead of original text, in this case.
I hit the issue with the following config (irrelevant options are skipped):
active_selections = PRIMARY,CLIPBOARD
sync_selections = yes
extract_patterns = yes
pattern_as_selection = yes
Then define a pattern to extract part of the selected text should be able reproduce the issue.
Reactions are currently unavailable