summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gmdocument.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 0a0966be..433e8dcc 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -164,6 +164,7 @@ static void doLayout_GmDocument_(iGmDocument *d) {
164 static const float bottomMargin[max_GmLineType] = { 164 static const float bottomMargin[max_GmLineType] = {
165 0.0f, 0.5f, 1.0f, 0.5f, 1.0f, 1.0f, 1.0f, 1.0f 165 0.0f, 0.5f, 1.0f, 0.5f, 1.0f, 1.0f, 1.0f, 1.0f
166 }; 166 };
167 const float midRunSkip = 0.1f; /* extra space between wrapped text/quote lines */
167 static const char *bullet = "\u2022"; 168 static const char *bullet = "\u2022";
168 clear_Array(&d->layout); 169 clear_Array(&d->layout);
169 clearLinks_GmDocument_(d); 170 clearLinks_GmDocument_(d);
@@ -270,6 +271,12 @@ static void doLayout_GmDocument_(iGmDocument *d) {
270 iRangecc runLine = line; 271 iRangecc runLine = line;
271 /* Create one or more runs for this line. */ 272 /* Create one or more runs for this line. */
272 while (!isEmpty_Range(&runLine)) { 273 while (!isEmpty_Range(&runLine)) {
274 /* Little bit of breathing space between wrapped lines. */
275 if ((type == text_GmLineType || type == quote_GmLineType ||
276 type == bullet_GmLineType) &&
277 runLine.start != line.start) {
278 pos.y += midRunSkip * lineHeight_Text(run.font);
279 }
273 run.bounds.pos = addX_I2(pos, indent * gap_UI); 280 run.bounds.pos = addX_I2(pos, indent * gap_UI);
274 const char *contPos; 281 const char *contPos;
275 const int avail = d->size.x - run.bounds.pos.x; 282 const int avail = d->size.x - run.bounds.pos.x;