diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-06 16:15:55 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-06 16:15:55 +0000 |
commit | d50d55228bfa7cbe86aca0f387485edc45713c25 (patch) | |
tree | aad08ba7faa100c38175b9b7c4858aafbd302772 | |
parent | 748b8497c9e78aec67cee0cb26bff26373b7d103 (diff) | |
parent | 288a5d415172675fae90aa82d436a380d9075288 (diff) | |
download | gtk+-d50d55228bfa7cbe86aca0f387485edc45713c25.tar.gz |
Merge branch 'textview-last-line' into 'master'
textview: Fix a problem with the last line
Closes #3835
See merge request GNOME/gtk!3403
-rw-r--r-- | gtk/gtktextlayout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 0d808d6bfb..d127c489b2 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -4114,7 +4114,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, gtk_text_layout_wrap_loop_start (layout); for (GtkTextLine *line = first_line; - line != last_line; + line != NULL; line = _gtk_text_line_next_excluding_last (line)) { GtkTextLineDisplay *line_display; @@ -4222,6 +4222,9 @@ gtk_text_layout_snapshot (GtkTextLayout *layout, offset_y += line_display->height; gtk_text_line_display_unref (line_display); + + if (line == last_line) + break; } gtk_text_layout_wrap_loop_end (layout); |