aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sc_parse.c4
-rw-r--r--src/shape.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c
index 4f8c4d3..ed7d7b8 100644
--- a/src/sc_parse.c
+++ b/src/sc_parse.c
@@ -429,7 +429,9 @@ SCBlock *sc_parse(const char *sc)
if ( sc == NULL ) return NULL;
if ( strlen(sc) == 0 ) {
- return sc_block_new();
+ SCBlock *bl = sc_block_new();
+ sc_block_set_contents(bl, strdup(""));
+ return bl;
}
bl = NULL;
diff --git a/src/shape.c b/src/shape.c
index 4ec870b..9320acd 100644
--- a/src/shape.c
+++ b/src/shape.c
@@ -271,7 +271,11 @@ int split_words(struct wrap_line *boxes, PangoContext *pc, SCBlock *bl,
if ( text == NULL ) return 1;
len_chars = g_utf8_strlen(text, -1);
- if ( len_chars == 0 ) return 1;
+ if ( len_chars == 0 ) {
+ add_wrap_boxes(boxes, text,
+ WRAP_SPACE_NONE, pc, scin, bl, 0, 0, editable);
+ return 1;
+ }
len_bytes = strlen(text);