GNOME Bugzilla – Bug 724420
SearchContext: add has_wrapped_around out parameters
Last modified: 2016-07-21 19:50:52 UTC
With the forward() and backward() functions, it is currently not easily possible to know if the search has wrapped around. With retrospection, I think the best is to add has_wrapped_around out parameters to these functions. But it is an API break, so we must wait GtkSourceView 4.0. In the meantime, there are two ways to know if the search has wrapped around: - compare the occurrence positions (if it goes from "20 of 20" to "1 of 20", the search has wrapped around). - compare the 'iter' (where to begin the search) with the returned 'match_start' and 'match_end'.
We don't need to wait GtkSourceView 4, we can create new functions and deprecate the previous ones. For example with the names forward2() and backward2(), like the Linux kernel does for some syscalls.
Done!