From 07d7741928b2c958137971f0a3548ada14abe4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Tue, 16 Jun 2015 00:16:27 +0200 Subject: [PATCH] Add wrapping search --- juci/notebook.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/juci/notebook.cc b/juci/notebook.cc index 9b7b060..f4862da 100644 --- a/juci/notebook.cc +++ b/juci/notebook.cc @@ -420,8 +420,12 @@ void Notebook::Controller::Search(bool forward) { auto buffer = CurrentTextView().get_source_buffer(); auto settings = gtk_source_search_settings_new(); gtk_source_search_settings_set_search_text(settings, entry_.text().c_str()); +gtk_source_search_settings_set_wrap_around(settings, TRUE); auto context = gtk_source_search_context_new(buffer->gobj(), settings); gtk_source_search_context_set_highlight(context, forward); + + + auto itr = buffer->get_insert()->get_iter().gobj(); gtk_source_search_context_forward(context, end ? end.gobj() : itr,