[gedit/wip/text-cut-off-5] test scroll to iter instead of scroll to mark, in idle - TEXT *CUT OFF*
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/text-cut-off-5] test scroll to iter instead of scroll to mark, in idle - TEXT *CUT OFF*
- Date: Fri, 22 Jul 2022 00:42:02 +0000 (UTC)
commit 42ead74a941bea579d693b19b15469eeea605721
Author: Sébastien Wilmet <swilmet informatique-libre be>
Date: Fri Jul 22 02:32:25 2022 +0200
test scroll to iter instead of scroll to mark, in idle - TEXT *CUT OFF*
gedit/gedit-tab.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 6c900786c..e6fc783ec 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1032,10 +1032,23 @@ static gboolean
scroll_to_cursor (GeditTab *tab)
{
GeditView *view;
+ GtkTextBuffer *buffer;
+ GtkTextIter iter;
g_print ("scroll to cursor\n");
+
view = gedit_tab_get_view (tab);
- tepl_view_scroll_to_cursor (TEPL_VIEW (view));
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
+ gtk_text_buffer_get_iter_at_mark (buffer,
+ &iter,
+ gtk_text_buffer_get_insert (buffer));
+
+ gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (view),
+ &iter,
+ 0.25,
+ FALSE,
+ 0.0,
+ 0.0);
tab->idle_scroll = 0;
return G_SOURCE_REMOVE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]