[gnome-builder] vim: Take count into account when deleting/yanking whole lines



commit 4d1877597a0ad8cb45ec1828231ae0d5e4664403
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Oct 4 17:24:14 2014 +0200

    vim: Take count into account when deleting/yanking whole lines
    
    Currently we only delete/yank a single line when using dd/yy,
    fix that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737911

 src/editor/gb-editor-vim.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 195c403..52d56e5 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -139,6 +139,10 @@ static GHashTable *gCommands;
 static GParamSpec *gParamSpecs [LAST_PROP];
 static guint       gSignals [LAST_SIGNAL];
 
+static void gb_editor_vim_cmd_select_line (GbEditorVim *vim,
+                                           guint        count,
+                                           gchar        modifier);
+
 GbEditorVim *
 gb_editor_vim_new (GtkTextView *text_view)
 {
@@ -2844,7 +2848,7 @@ gb_editor_vim_cmd_delete (GbEditorVim *vim,
   gb_editor_vim_clear_selection (vim);
 
   if (modifier == 'd')
-    gb_editor_vim_select_line (vim);
+    gb_editor_vim_cmd_select_line (vim, count, '\0');
   else
     {
       GbEditorVimCommand *cmd;
@@ -3169,7 +3173,7 @@ gb_editor_vim_cmd_yank (GbEditorVim *vim,
   gb_editor_vim_save_position (vim);
 
   if (modifier == 'y')
-      gb_editor_vim_select_line (vim);
+      gb_editor_vim_cmd_select_line (vim, count, '\0');
   else
     {
       GbEditorVimCommand *cmd;


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