SourceSearchContext.backward2

Synchronous backward search. It is recommended to use the asynchronous functions instead, to not block the user interface. However, if you are sure that the @buffer is small, this function is more convenient to use.

The difference with gtk_source_search_context_backward() is that the @has_wrapped_around out parameter has been added for convenience.

If the #GtkSourceSearchSettings:wrap-around property is %FALSE, this function doesn't try to wrap around.

The @has_wrapped_around out parameter is set independently of whether a match is found. So if this function returns %FALSE, @has_wrapped_around will have the same value as the #GtkSourceSearchSettings:wrap-around property.

class SourceSearchContext
bool
backward2

Parameters

iter TextIter

start of search.

matchStart TextIter

return location for start of match, or %NULL.

matchEnd TextIter

return location for end of match, or %NULL.

hasWrappedAround bool

return location to know whether the search has wrapped around, or %NULL.

Return Value

Type: bool

whether a match was found.

Meta

Since

3.22