[gnome-builder] GbEditorFrame: keep cursor on screen when performing scroll actions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbEditorFrame: keep cursor on screen when performing scroll actions
- Date: Fri, 19 Dec 2014 10:29:54 +0000 (UTC)
commit af3650d9c72efec0f9976f69533728db3af46664
Author: Christian Hergert <christian hergert me>
Date: Fri Dec 19 02:29:43 2014 -0800
GbEditorFrame: keep cursor on screen when performing scroll actions
src/editor/gb-editor-frame.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-frame.c b/src/editor/gb-editor-frame.c
index dbc56c4..c6ecc5d 100644
--- a/src/editor/gb-editor-frame.c
+++ b/src/editor/gb-editor-frame.c
@@ -1017,6 +1017,7 @@ gb_editor_frame_scroll_down (GSimpleAction *action,
g_return_if_fail (GB_IS_EDITOR_FRAME (frame));
gb_editor_frame_scroll (frame, GTK_DIR_DOWN);
+ gtk_text_view_place_cursor_onscreen (GTK_TEXT_VIEW (frame->priv->source_view));
}
static void
@@ -1029,6 +1030,7 @@ gb_editor_frame_scroll_up (GSimpleAction *action,
g_return_if_fail (GB_IS_EDITOR_FRAME (frame));
gb_editor_frame_scroll (frame, GTK_DIR_UP);
+ gtk_text_view_place_cursor_onscreen (GTK_TEXT_VIEW (frame->priv->source_view));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]