aboutsummaryrefslogtreecommitdiff
path: root/src/sc_parse.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-22 16:12:20 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-22 16:12:20 +0100
commit24e5163fd377e860a62595d01b187be8df1d7a7d (patch)
tree14ee72c70fc6a7c7f4ab8c243f78d1b390c6b4b2 /src/sc_parse.c
parentc12f041d4e151cf0bbbb4e2c92c4bbc45e5fa67a (diff)
WIP on slide adding
Diffstat (limited to 'src/sc_parse.c')
-rw-r--r--src/sc_parse.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c
index e4f0e0e..1f3645a 100644
--- a/src/sc_parse.c
+++ b/src/sc_parse.c
@@ -1,7 +1,7 @@
/*
* sc_parse.c
*
- * Copyright © 2013-2014 Thomas White <taw@bitwiz.org.uk>
+ * Copyright © 2013-2015 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
*
@@ -555,6 +555,17 @@ void sc_insert_text(SCBlock *b1, int o1, const char *t)
}
+void sc_insert_block(SCBlock *b1, int o1, SCBlock *ins)
+{
+ char *p1 = g_utf8_offset_to_pointer(b1->contents, o1);
+ SCBlock *old_next = b1->next;
+ b1->next = ins;
+ if ( strlen(p1) > 0 ) {
+ // sc_block_append_end(b1, NULL, NULL, p1);
+ }
+}
+
+
static void delete_from_block(SCBlock *b, int o1, int o2)
{
if ( o1 == o2 ) return; /* nothing to delete */