GtkSourceSearchContext: simple asynchronous search does not succeed when combining the "highlight" property with regex search
GtkSourceView versions:
3.24.11
4.8.0
Steps to reproduce:
- Open the attached file in Gedit (I used Gedit 3.38.0, GtkSourceView 4.8.0);
- Be sure to have "search-highlighting" set to true (run
gsettings set org.gnome.gedit.preferences.editor search-highlighting true
if needed); - Go to line 7500;
- Open the "Find and Replace" dialog, enable regex search, and search for something on line 7501 (
<
orp
or whatever you want)
Expected result: the search should succeed quickly.
Actual result: the search takes very long to succeed (or doesn't succeed at all in some cases?).
This issue does not happen if regex search and/or "search-highlighting" are disabled. When the search above is running, if you set "search-highlighting" to false via gsettings
, it will make the search succeed almost instantaneously.
I initially encountered this issue while tinkering Mousepad code (the Xfce text editor), which uses on my system GtkSourceView 3.24.11. That's why I can also say that it is reproducible with GtkSourceView 3.24.11, and only for asynchronous searches: Mousepad currently runs only synchronous searches (so this issue is not reproducible with Mousepad master), and I'm precisely working to make them asynchronous.