[gnome-builder/gnome-builder-3-28] vim: fix "syntax off" command



commit 82c82f4ad68e8d5f33fdfdb4724ed4d7368b4089
Author: Christian Hergert <chergert redhat com>
Date:   Mon Apr 2 13:46:33 2018 -0700

    vim: fix "syntax off" command
    
    This looks like it was fallout during vim refactoring long ago. We should
    probably try to avoid using g_object_set() whenever possible for this
    exact reason.

 src/plugins/command-bar/gb-vim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/command-bar/gb-vim.c b/src/plugins/command-bar/gb-vim.c
index 21eb39b33..91c8cd150 100644
--- a/src/plugins/command-bar/gb-vim.c
+++ b/src/plugins/command-bar/gb-vim.c
@@ -751,12 +751,12 @@ gb_vim_command_syntax (GtkWidget      *active_widget,
 
   if (IDE_IS_EDITOR_VIEW (active_widget))
     {
-      IdeSourceView *source_view = ide_editor_view_get_view (IDE_EDITOR_VIEW (active_widget));
+      IdeBuffer *buffer = ide_editor_view_get_buffer (IDE_EDITOR_VIEW (active_widget));
 
       if (g_str_equal (options, "enable") || g_str_equal (options, "on"))
-        g_object_set (source_view, "highlight-syntax", TRUE, NULL);
+        gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (buffer), TRUE);
       else if (g_str_equal (options, "off"))
-        g_object_set (source_view, "highlight-syntax", FALSE, NULL);
+        gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (buffer), FALSE);
       else
         {
           g_set_error (error,


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