[gnome-builder/wip/vim] vim: allow selecting last character in buffer with select_char().
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/vim] vim: allow selecting last character in buffer with select_char().
- Date: Thu, 2 Oct 2014 20:51:01 +0000 (UTC)
commit cf1002bfda61ea9ce029599c4237ba1d234f6d45
Author: Christian Hergert <christian hergert me>
Date: Thu Oct 2 13:40:59 2014 -0700
vim: allow selecting last character in buffer with select_char().
src/editor/gb-editor-vim.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index bf2e129..f28d59c 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -1149,8 +1149,10 @@ gb_editor_vim_select_char (GbEditorVim *vim)
gtk_text_buffer_get_iter_at_mark (buffer, &begin, insert);
gtk_text_iter_assign (&end, &begin);
- if (gtk_text_iter_forward_char (&end))
- gb_editor_vim_select_range (vim, &end, &begin);
+ if (!gtk_text_iter_forward_char (&end))
+ gtk_text_buffer_get_end_iter (buffer, &end);
+
+ gb_editor_vim_select_range (vim, &end, &begin);
gb_editor_vim_set_selection_anchor (vim, &begin, &end);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]