summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-13 19:39:17 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-25 00:42:49 -0400
commit283c2d998b8efc2901dafaf9ed233782cc612214 (patch)
treeb6f55acd9da4241c64e28a4352f21b8d3f205473
parente690d2402462325fec08fc03525259af9753c78f (diff)
downloadpango-283c2d998b8efc2901dafaf9ed233782cc612214.tar.gz
layout: Use a show attribute
Use an attribute to show line breaks in single-paragraph mode.
-rw-r--r--pango/pango-layout.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5db6f7e1..b3303b3d 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3977,6 +3977,12 @@ pango_layout_get_effective_attributes (PangoLayout *layout)
pango_attr_list_insert_before (attrs, attr);
}
+ if (layout->single_paragraph)
+ {
+ PangoAttribute *attr = pango_attr_show_new (PANGO_SHOW_LINE_BREAKS);
+ pango_attr_list_insert_before (attrs, attr);
+ }
+
return attrs;
}