[gtksourceview] vim: reset im-context and cursor-blink
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] vim: reset im-context and cursor-blink
- Date: Fri, 12 Nov 2021 19:20:07 +0000 (UTC)
commit 9197c20f4cb61f872e707a46333bb88c30de6f09
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 12 11:15:28 2021 -0800
vim: reset im-context and cursor-blink
We want motions (when applied implicitely) to work similar to how the
GtkTextView::move-cursor() signal works. It needs to reset the im-context
as well as the cursor-blink.
Fixes #234
gtksourceview/vim/gtksourcevimmotion.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gtksourceview/vim/gtksourcevimmotion.c b/gtksourceview/vim/gtksourcevimmotion.c
index 6f0371f7..8602e139 100644
--- a/gtksourceview/vim/gtksourcevimmotion.c
+++ b/gtksourceview/vim/gtksourcevimmotion.c
@@ -1909,6 +1909,7 @@ gtk_source_vim_motion_repeat (GtkSourceVimState *state)
{
GtkSourceVimMotion *self = (GtkSourceVimMotion *)state;
GtkSourceBuffer *buffer;
+ GtkSourceView *view;
GtkTextIter iter;
int count;
@@ -1919,6 +1920,7 @@ gtk_source_vim_motion_repeat (GtkSourceVimState *state)
return;
}
+ view = gtk_source_vim_state_get_view (state);
buffer = gtk_source_vim_state_get_buffer (state, &iter, NULL);
count = get_adjusted_count (self);
@@ -1945,6 +1947,9 @@ gtk_source_vim_motion_repeat (GtkSourceVimState *state)
{
gtk_source_vim_state_select (state, &iter, &iter);
}
+
+ gtk_text_view_reset_im_context (GTK_TEXT_VIEW (view));
+ gtk_text_view_reset_cursor_blink (GTK_TEXT_VIEW (view));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]