[gnome-builder/wip/libide-merge] add :cnext and :cprevious for vim error movements



commit c011325a87b6ecf21cb4fbcd13f503076ae1411b
Author: Christian Hergert <christian hergert me>
Date:   Sat Mar 21 16:59:41 2015 -0700

    add :cnext and :cprevious for vim error movements

 src/vim/gb-vim.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index 3d01102..88790b2 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -540,8 +540,33 @@ gb_vim_command_sort (GtkSourceView  *source_view,
   return TRUE;
 }
 
+static gboolean
+gb_vim_command_cnext (GtkSourceView  *source_view,
+                      const gchar    *command,
+                      const gchar    *options,
+                      GError        **error)
+{
+  if (IDE_IS_SOURCE_VIEW (source_view))
+    g_signal_emit_by_name (source_view, "move-error", GTK_DIR_DOWN);
+  return TRUE;
+}
+
+static gboolean
+gb_vim_command_cprevious (GtkSourceView  *source_view,
+                          const gchar    *command,
+                          const gchar    *options,
+                          GError        **error)
+{
+  if (IDE_IS_SOURCE_VIEW (source_view))
+    g_signal_emit_by_name (source_view, "move-error", GTK_DIR_UP);
+  return TRUE;
+}
+
+
 static const GbVimCommand vim_commands[] = {
+  { "cnext",       gb_vim_command_cnext },
   { "colorscheme", gb_vim_command_colorscheme },
+  { "cprevious",   gb_vim_command_cprevious },
   { "edit",        gb_vim_command_edit },
   { "nohl",        gb_vim_command_nohl },
   { "quit",        gb_vim_command_quit },


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