[gnome-builder/editor-layout] use helper for scrolling so we can add work arounds for gtk bugs
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/editor-layout] use helper for scrolling so we can add work arounds for gtk bugs
- Date: Sun, 30 Nov 2014 13:19:52 +0000 (UTC)
commit b6d4e8316e3a9b5f7953fa198a335c22d056e9b5
Author: Christian Hergert <christian hergert me>
Date: Sun Nov 30 02:32:20 2014 -0800
use helper for scrolling so we can add work arounds for gtk bugs
src/editor/gb-source-view.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-source-view.c b/src/editor/gb-source-view.c
index e84f739..a5e4f8a 100644
--- a/src/editor/gb-source-view.c
+++ b/src/editor/gb-source-view.c
@@ -30,6 +30,7 @@
#include "gb-box-theatric.h"
#include "gb-cairo.h"
#include "gb-editor-document.h"
+#include "gb-gtk.h"
#include "gb-log.h"
#include "gb-source-auto-indenter.h"
#include "gb-source-search-highlighter.h"
@@ -631,12 +632,16 @@ gb_source_view_scroll_to_insert (GbSourceView *view)
{
GtkTextBuffer *buffer;
GtkTextMark *mark;
+ GtkTextIter iter;
g_return_if_fail (GB_IS_SOURCE_VIEW (view));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
mark = gtk_text_buffer_get_insert (buffer);
- gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (view), mark, 0.0, FALSE, 0, 0);
+ gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
+
+ gb_gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (view), &iter,
+ 0.0, FALSE, 0.0, 0.0);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]