GNOME Bugzilla – Bug 767978
SearchContext: Ensure occurrences_count is updated in an edge case
Last modified: 2016-06-24 12:06:54 UTC
There may be a more elegant way to do this but it works. I verified that the unit test I wrote fails without these commits
Created attachment 330262 [details] [review] SearchContext: Ensure occurrences_count is updated in an edge case When at_word_boundaries is set in the SearchSettings and an insertion occurs on a word boundary, the affected occurrence needs to be re-scanned. This commit changes remove_occurrences_in_range to properly adjust the given boundaries to accomplish this.
Created attachment 330263 [details] [review] SearchContext: Add test case for insertion on word boundaries
Created attachment 330264 [details] [review] SearchContext: Update implementation documentation
Thanks, I've reviewed carefully the patches, and it's indeed correct. I've squashed the third commit with the first one. Pushed on master: commit adb7625dc5dee12c261d7ea2fe8b80f9bdbe965b commit 86991baebf0d69601580db351dfd2ba387a84a05 I will backport the commits on 3.20.