[gnome-builder] add back :nohl



commit 14c3861402e1481023a34e44ff7cb1e6394066ef
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 20 01:47:24 2015 -0700

    add back :nohl

 src/vim/gb-vim.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index a4f8e24..817c1cf 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -445,6 +445,24 @@ gb_vim_command_wq (GtkSourceView  *source_view,
 }
 
 static gboolean
+gb_vim_command_nohl (GtkSourceView  *source_view,
+                     const gchar    *command,
+                     const gchar    *options,
+                     GError        **error)
+{
+  if (IDE_IS_SOURCE_VIEW (source_view))
+    {
+      GtkSourceSearchContext *context = NULL;
+
+      g_object_get (source_view, "search-context", &context, NULL);
+      g_object_set (context, "highlight", FALSE, NULL);
+      g_clear_object (&context);
+    }
+
+  return TRUE;
+}
+
+static gboolean
 gb_vim_command_syntax (GtkSourceView  *source_view,
                        const gchar    *command,
                        const gchar    *options,
@@ -468,11 +486,12 @@ gb_vim_command_syntax (GtkSourceView  *source_view,
 }
 
 static const GbVimCommand vim_commands[] = {
+  //{ "sort",        gb_vim_command_sort },
   { "colorscheme", gb_vim_command_colorscheme },
   { "edit",        gb_vim_command_edit },
+  { "nohl",        gb_vim_command_nohl },
   { "quit",        gb_vim_command_quit },
   { "set",         gb_vim_command_set },
-  //{ "sort",        gb_vim_command_sort },
   { "split",       gb_vim_command_split },
   { "syntax",      gb_vim_command_syntax },
   { "vsplit",      gb_vim_command_vsplit },


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