aboutsummaryrefslogtreecommitdiff
path: root/src/sc_editor.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-10-11 23:02:38 +0200
committerThomas White <taw@bitwiz.org.uk>2015-10-11 23:02:38 +0200
commita8112c90cf0fdf44ceee5b54fed77468f5c15757 (patch)
treef4ff9f9492d5685e042eaf68cf6339d5c4c05927 /src/sc_editor.c
parent702407e5f93ac71b686ec3ee9ff8cab022d4e446 (diff)
Keep track of the boxes at the three levels: orig, para, wrapped
Diffstat (limited to 'src/sc_editor.c')
-rw-r--r--src/sc_editor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 1b1bb04..b9a0032 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -579,6 +579,13 @@ static void insert_text(char *t, SCEditor *e)
printf("sps=%i, offs_char=%i\n", sps, sbox->offs_char);
sc_insert_text(sbox->scblock, sps+sbox->offs_char, t);
+ /* Update the length of the box in the unwrapped and un-paragraph-split
+ * string of wrap boxes */
+ sbox->cf->cf->len_chars += 1;
+
+ /* ... and also in the paragraph split but unwrapped box */
+ sbox->cf->len_chars += 1;
+
fr->empty = 0;
full_rerender(e); /* FIXME: No need for full */