diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-03-17 18:50:44 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-03-17 18:50:44 +0100 |
commit | 59fb796d5323e13ed9b4ad81d82085339a54088c (patch) | |
tree | 3623a92d1bd99d6d0287fd19e5bea05c43dd2b5e /src | |
parent | 6d2256cfc1bdf152c46a49f78a096b8e75a753d6 (diff) |
Fix end of paragraph
Diffstat (limited to 'src')
-rw-r--r-- | src/wrap.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -366,11 +366,11 @@ static double sp_y(enum wrap_box_space s) return 10.0*PANGO_SCALE; case WRAP_SPACE_EOP : - return 0.0; + return INFINITY; default: case WRAP_SPACE_NONE : - return INFINITY; + return 0.0; } } @@ -589,6 +589,9 @@ static void knuth_suboptimal_fit(struct wrap_line *boxes, double line_length, n = boxes->n_boxes; + /* Set the space for the last box to be "end of paragraph" */ + boxes->boxes[boxes->n_boxes-1].space = WRAP_SPACE_EOP; + /* Add empty zero-width box at end */ if ( boxes->n_boxes == boxes->max_boxes ) { boxes->max_boxes += 32; |