[recipes/recipes-1.0] edit page: Keep caret visible
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/recipes-1.0] edit page: Keep caret visible
- Date: Sun, 7 May 2017 20:16:01 +0000 (UTC)
commit 7528c8a2a89b4219c91b9480cde471a9374e11fd
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 6 17:42:07 2017 -0400
edit page: Keep caret visible
We move the caret around when adding a new step. It is a bit
disorienting if the caret just disappears from view, so keep
it scrolled on screen.
src/gr-edit-page.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index f2d2d34..570e206 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -1256,6 +1256,8 @@ add_step (GtkButton *button, GrEditPage *self)
gtk_text_buffer_get_end_iter (buffer, &end);
gtk_text_buffer_place_cursor (buffer, &end);
gtk_text_buffer_insert_at_cursor (buffer, "\n\n", 2);
+ gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (self->instructions_field),
+ gtk_text_buffer_get_insert (buffer));
set_unsaved (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]