[gtksourceview] vim: scroll to cursor entering insert or replace states
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] vim: scroll to cursor entering insert or replace states
- Date: Fri, 19 Nov 2021 01:09:54 +0000 (UTC)
commit 633b52bc26f3c25203cc539470eaa6244fcaee7b
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 18 17:09:40 2021 -0800
vim: scroll to cursor entering insert or replace states
gtksourceview/vim/gtksourceviminsert.c | 2 ++
gtksourceview/vim/gtksourcevimreplace.c | 1 +
2 files changed, 3 insertions(+)
---
diff --git a/gtksourceview/vim/gtksourceviminsert.c b/gtksourceview/vim/gtksourceviminsert.c
index e73fc8b0..0d90a658 100644
--- a/gtksourceview/vim/gtksourceviminsert.c
+++ b/gtksourceview/vim/gtksourceviminsert.c
@@ -342,6 +342,8 @@ gtk_source_vim_insert_enter (GtkSourceVimState *state)
gtk_source_vim_insert_prepare (self);
gtk_source_vim_text_history_begin (self->history);
+ gtk_source_vim_state_scroll_insert_onscreen (state);
+
g_object_unref (history);
}
diff --git a/gtksourceview/vim/gtksourcevimreplace.c b/gtksourceview/vim/gtksourcevimreplace.c
index a49b7fe1..fd78720b 100644
--- a/gtksourceview/vim/gtksourcevimreplace.c
+++ b/gtksourceview/vim/gtksourcevimreplace.c
@@ -97,6 +97,7 @@ gtk_source_vim_replace_enter (GtkSourceVimState *state)
g_assert (GTK_SOURCE_IS_VIM_REPLACE (state));
gtk_source_vim_state_set_overwrite (state, TRUE);
+ gtk_source_vim_state_scroll_insert_onscreen (state);
gtk_source_vim_state_begin_user_action (state);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]