aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sc_interp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c
index 943afd3..9899a95 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -820,6 +820,7 @@ static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl,
size_t start, len_bytes;
PangoFontDescription *fontdesc;
double *col;
+ int just_closed = 0;
/* Empty block? */
if ( text == NULL ) return 1;
@@ -846,12 +847,18 @@ static int add_text(struct frame *fr, PangoContext *pc, SCBlock *bl,
}
if ( text[start] == '\n' ) {
+ if ( just_closed ) {
+ Paragraph *para = last_open_para(fr);
+ add_run(para, bl, start, 0, fontdesc, col);
+ }
close_last_paragraph(fr);
start += 1;
+ just_closed = 1;
} else {
Paragraph *para = last_open_para(fr);
add_run(para, bl, start, len, fontdesc, col);
start += len;
+ just_closed = 0;
}
} while ( start < len_bytes );