[gnome-builder] source-view: use persistent scroller to work around gtk bugs
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] source-view: use persistent scroller to work around gtk bugs
- Date: Tue, 2 Dec 2014 04:27:05 +0000 (UTC)
commit 6403b485df80cf1e5a16fe5b2b5e8fda20d63e9b
Author: Christian Hergert <christian hergert me>
Date: Mon Dec 1 20:13:26 2014 -0800
source-view: use persistent scroller to work around 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 ad2e7ef..4605fe6 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"
@@ -634,12 +635,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]