[gnome-builder/wip/vim] vim: `p' of whole line should leave us on index 0.



commit 26b1212e0fed39acd1fb0ec7ef1c129acb7d6670
Author: Christian Hergert <christian hergert me>
Date:   Wed Oct 1 23:32:08 2014 -0700

    vim: `p' of whole line should leave us on index 0.
    
    This is what VIM does at least. I actually always found it rather
    annoying, but now I'm used to it.

 src/editor/gb-editor-vim.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 89bcac6..4a9a058 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -1143,6 +1143,11 @@ gb_editor_vim_paste (GbEditorVim *vim)
       g_signal_emit_by_name (vim->priv->text_view, "paste-clipboard");
       gtk_clipboard_set_text (clipboard, text, -1);
       g_free (trimmed);
+
+      /*
+       * VIM leaves us on position 0 when pasting a whole line.
+       */
+      offset = 0;
     }
   else
     {


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