[gnome-builder] vim: Keep cursor on changed word for ctrl-a/x
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: Keep cursor on changed word for ctrl-a/x
- Date: Sun, 5 Oct 2014 21:21:57 +0000 (UTC)
commit 1e1c70338ee0a86ae8a8a527600db4dd2bfff5b4
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Oct 4 23:21:26 2014 +0200
vim: Keep cursor on changed word for ctrl-a/x
Vim's ctrl-a/x commands keep the cursor at the end of the modified
word, which allows for repeated increments/decrements. Match that
behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=737910
src/editor/gb-editor-vim.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 5fbdefc..195c403 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -1912,6 +1912,7 @@ gb_editor_vim_add (GbEditorVim *vim,
gtk_text_buffer_delete (buffer, &iter, &selection);
gtk_text_buffer_insert (buffer, &iter, replace, -1);
+ gtk_text_iter_backward_char (&iter);
gtk_text_buffer_select_range (buffer, &iter, &iter);
cleanup:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]