[gtksourceview/wip/chergert/vim: 343/363] re highlight when necessary




commit c789ab5cfceb8c066501b170a716cf3272057d7e
Author: Christian Hergert <chergert redhat com>
Date:   Sat Nov 6 19:51:48 2021 -0700

    re highlight when necessary

 gtksourceview/vim/gtk-source-vim-motion.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/vim/gtk-source-vim-motion.c b/gtksourceview/vim/gtk-source-vim-motion.c
index 391784a9..96230afe 100644
--- a/gtksourceview/vim/gtk-source-vim-motion.c
+++ b/gtksourceview/vim/gtk-source-vim-motion.c
@@ -1353,6 +1353,8 @@ motion_search (GtkTextIter        *iter,
                ret = TRUE;
        }
 
+       gtk_source_search_context_set_highlight (context, ret);
+
        return ret;
 }
 
@@ -1384,6 +1386,8 @@ motion_next_search (GtkTextIter        *iter,
 
        matched = gtk_source_search_context_forward (context, iter, iter, NULL, &has_wrapped_around);
 
+       gtk_source_search_context_set_highlight (context, matched);
+
        return matched;
 }
 
@@ -1397,7 +1401,9 @@ motion_prev_search (GtkTextIter        *iter,
 
        gtk_source_vim_state_get_search (GTK_SOURCE_VIM_STATE (self), NULL, &context);
 
-        matched = gtk_source_search_context_backward (context, iter, iter, NULL, &has_wrapped_around);
+       matched = gtk_source_search_context_backward (context, iter, iter, NULL, &has_wrapped_around);
+
+       gtk_source_search_context_set_highlight (context, matched);
 
        return matched;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]