sync_selections + pattern_as_selection = infinite loop
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.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.