aboutsummaryrefslogtreecommitdiff
path: root/src/shape.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-14 21:31:22 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-15 16:49:03 +0100
commitfb32032705ef68b79aa6814a7f754e06b0558e3d (patch)
tree9a541d14869442dafa325e38fcf6670fea39f662 /src/shape.c
parentc247f4faa852057d7d59c454d5e532a01e93b080 (diff)
Set offset for nothing boxes
Diffstat (limited to 'src/shape.c')
-rw-r--r--src/shape.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shape.c b/src/shape.c
index 4518821..9d6a2ac 100644
--- a/src/shape.c
+++ b/src/shape.c
@@ -102,7 +102,7 @@ static void add_wrap_box(gpointer vi, gpointer vb)
static void add_nothing_box(struct wrap_line *line, SCBlock *scblock,
int editable, enum wrap_box_space sp,
- SCInterpreter *scin)
+ SCInterpreter *scin, size_t offs)
{
struct wrap_box *box;
@@ -115,7 +115,7 @@ static void add_nothing_box(struct wrap_line *line, SCBlock *scblock,
box = &line->boxes[line->n_boxes];
box->type = WRAP_BOX_NOTHING;
box->scblock = scblock;
- box->offs_char = 0;
+ box->offs_char = offs;
box->space = sp;
box->width = 0;
box->ascent = sc_interp_get_ascent(scin);
@@ -181,7 +181,7 @@ static int add_wrap_boxes(struct wrap_line *line, const char *text,
//printf("adding '%s'\n", swizzle(text+offs, len));
while ( len==0 ) {
- add_nothing_box(line, bl, editable, space, scin);
+ add_nothing_box(line, bl, editable, space, scin, offs);
return 0;
}