From 908b1e5e1214afc01440bc07a8d937222f411f38 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 29 Jul 2021 16:45:04 -0700 Subject: [PATCH] textview: fix yoffset position when top_margin is set This doesn't need to be included in the calculation or it will cause the yoffset to continually shift while the window is resized. Fixes #4134 --- gtk/gtktextview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 71c48ab844..3f5836f0aa 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4892,7 +4892,7 @@ changed_handler (GtkTextLayout *layout, gtk_text_layout_get_line_yrange (layout, &first, &new_first_para_top, NULL); - old_first_para_top = priv->yoffset - priv->first_para_pixels + priv->top_margin; + old_first_para_top = priv->yoffset - priv->first_para_pixels; if (new_first_para_top != old_first_para_top) {