[gtksourceview/wip/chergert/vim] update selection for linewise motions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/vim] update selection for linewise motions
- Date: Sat, 30 Oct 2021 21:40:28 +0000 (UTC)
commit bf4250180d0fdd843eea12a52049171d921dbc77
Author: Christian Hergert <chergert redhat com>
Date: Sat Oct 30 14:40:24 2021 -0700
update selection for linewise motions
gtksourceview/vim/gtk-source-vim-visual.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gtksourceview/vim/gtk-source-vim-visual.c b/gtksourceview/vim/gtk-source-vim-visual.c
index 3cb7b37e..48803e1f 100644
--- a/gtksourceview/vim/gtk-source-vim-visual.c
+++ b/gtksourceview/vim/gtk-source-vim-visual.c
@@ -125,8 +125,18 @@ gtk_source_vim_visual_track_char (GtkSourceVimVisual *self)
static void
gtk_source_vim_visual_track_line (GtkSourceVimVisual *self)
{
+ GtkSourceBuffer *buffer;
+ GtkTextIter cursor, started_at;
+
g_assert (GTK_SOURCE_IS_VIM_VISUAL (self));
+ buffer = gtk_source_vim_state_get_buffer (GTK_SOURCE_VIM_STATE (self), NULL, NULL);
+ gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (buffer), &cursor, self->cursor);
+ gtk_text_buffer_get_iter_at_mark (GTK_TEXT_BUFFER (buffer), &started_at, self->started_at);
+
+ extend_lines (&cursor, &started_at);
+
+ gtk_source_vim_state_select (GTK_SOURCE_VIM_STATE (self), &cursor, &started_at);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]