After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754883 - SearchContext: revalidate match_start and match_end iters when doing a replace()
SearchContext: revalidate match_start and match_end iters when doing a replace()
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-11 14:08 UTC by Sébastien Wilmet
Modified: 2016-06-04 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Wilmet 2015-09-11 14:08:42 UTC
The gtk_source_search_context_replace() function should revalidate the match_start and match_end iters to point to the replacement text boundaries.

But doing that is not possible without an API break. So it's for GtkSourceView 4.
Comment 1 Sébastien Wilmet 2016-06-04 12:51:00 UTC
Note to myself: fixing this would simplify code in gnome-c-utils lineup-substitution.c.

And we don't need to wait GtkSourceView 4, we can create another function and deprecate the previous one. For example with the name gtk_source_search_context_replace2(), like the Linux kernel does for some syscalls.
Comment 2 Sébastien Wilmet 2016-06-04 15:36:02 UTC
Done:
commit cb8f41adeb71c569b464bfb9fcf0f1346b0a2123
commit 2b5e99b1e2439feb2119dfa80dc81f21605cb9ee
commit cf839aca2bdf04fe32e91c643a1153e60db2b658

The last commit deprecates replace().