[gnome-builder/wip/commands] vim: fix set filetype operation.



commit 9affc938528594c9ed1f8c58dc51d8783555b751
Author: Christian Hergert <christian hergert me>
Date:   Wed Oct 8 02:38:23 2014 -0700

    vim: fix set filetype operation.

 src/editor/gb-editor-vim.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 8cde9ff..da950cd 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -3096,7 +3096,9 @@ gb_editor_vim_op_filetype (GbEditorVim *vim,
   GtkTextBuffer *buffer;
 
   g_assert (GB_IS_EDITOR_VIM (vim));
-  g_assert (name);
+  g_assert (g_str_has_prefix (name, "set filetype="));
+
+  name += strlen ("set filetype=");
 
   buffer = gtk_text_view_get_buffer (vim->priv->text_view);
 


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