diff options
author | Thomas White <taw@physics.org> | 2018-02-18 19:48:22 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-19 20:19:04 +0100 |
commit | 889bff2106db15c5bb7100e7fdd6f14ad6ae2bd5 (patch) | |
tree | 1edfd15832470fb43376376dca1933c5d06827a0 /src/sc_editor.c | |
parent | 66d7abfe17971edc86ac3b06b272d9234f0b4cfe (diff) |
Remove text run SCBlock offset
The \newpara change (commit 7f2d0abd) removed the only situation when the
start of a run might not coincide with the start of an SCBlock, or vice-versa
(although not all SCBlocks correspond to text runs, obviously).
Therefore, the offset is always zero and can be removed, simplifying the code.
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r-- | src/sc_editor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index 5cb1b00..3c5c064 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -853,7 +853,7 @@ static void insert_text(char *t, SCEditor *e) fprintf(stderr, "Failed to insert paragraph\n"); return; } - add_run(pnew, ad, NULL, NULL, 0, strlen(t), + add_run(pnew, ad, NULL, NULL, strlen(t), e->cursor_frame->fontdesc, e->cursor_frame->col, 0); wrap_frame(e->cursor_frame, e->pc); @@ -1076,7 +1076,7 @@ static void check_paragraph(struct frame *fr, PangoContext *pc, } scblocks = sc_block_append(scblocks, NULL, NULL, strdup(""), NULL); - add_run(para, scblocks, NULL, NULL, 0, 0, fr->fontdesc, fr->col, 0); + add_run(para, scblocks, NULL, NULL, 0, fr->fontdesc, fr->col, 0); wrap_paragraph(para, pc, fr->w - fr->pad_l - fr->pad_r, 0, 0); } |