[gnome-text-editor] page: scroll to cursor position after goto line
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] page: scroll to cursor position after goto line
- Date: Wed, 6 Oct 2021 18:01:29 +0000 (UTC)
commit e60898f556c19683448e0919c33bba18794193e7
Author: Christian Hergert <chergert redhat com>
Date: Wed Oct 6 10:59:46 2021 -0700
page: scroll to cursor position after goto line
src/editor-page-actions.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/editor-page-actions.c b/src/editor-page-actions.c
index 57bee49..edc22fb 100644
--- a/src/editor-page-actions.c
+++ b/src/editor-page-actions.c
@@ -163,6 +163,8 @@ editor_page_actions_goto_line (GtkWidget *widget,
g_unichar_isspace (gtk_text_iter_get_char (&iter)))
gtk_text_iter_forward_char (&iter);
gtk_text_buffer_select_range (GTK_TEXT_BUFFER (document), &iter, &iter);
+ gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (self->view),
+ gtk_text_buffer_get_insert (GTK_TEXT_BUFFER (document)));
}
gtk_revealer_set_reveal_child (self->goto_line_revealer, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]