textview: Fix a problem with the last line
Sometimes, we missed the last line for display. Fixes: #3835
This commit is contained in:
@@ -4114,7 +4114,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
|
|||||||
gtk_text_layout_wrap_loop_start (layout);
|
gtk_text_layout_wrap_loop_start (layout);
|
||||||
|
|
||||||
for (GtkTextLine *line = first_line;
|
for (GtkTextLine *line = first_line;
|
||||||
line != last_line;
|
line != NULL;
|
||||||
line = _gtk_text_line_next_excluding_last (line))
|
line = _gtk_text_line_next_excluding_last (line))
|
||||||
{
|
{
|
||||||
GtkTextLineDisplay *line_display;
|
GtkTextLineDisplay *line_display;
|
||||||
@@ -4222,6 +4222,9 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
|
|||||||
offset_y += line_display->height;
|
offset_y += line_display->height;
|
||||||
|
|
||||||
gtk_text_line_display_unref (line_display);
|
gtk_text_line_display_unref (line_display);
|
||||||
|
|
||||||
|
if (line == last_line)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_text_layout_wrap_loop_end (layout);
|
gtk_text_layout_wrap_loop_end (layout);
|
||||||
|
|||||||
Reference in New Issue
Block a user