aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shape.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shape.c b/src/shape.c
index 74112b0..e5c568c 100644
--- a/src/shape.c
+++ b/src/shape.c
@@ -310,9 +310,10 @@ int split_words(struct wrap_line *boxes, PangoContext *pc, SCBlock *bl,
/* Stuff up to (but not including) sc[i] forms a
* wrap box */
len = offs - start;
+ /* FIXME: Ugh */
if ( log_attrs[i].is_mandatory_break ) {
type = WRAP_SPACE_EOP;
- if ( (i>0) && (text[i-1]=='\n') ) len--;
+ if ( (i>0) && (g_utf8_prev_char(ptr)[0]=='\n') ) len--;
} else if ( (i>0)
&& log_attrs[i-1].is_expandable_space ) {
type = WRAP_SPACE_INTERWORD;