From 24e5163fd377e860a62595d01b187be8df1d7a7d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 22 Feb 2015 16:12:20 +0100 Subject: WIP on slide adding --- src/sc_parse.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/sc_parse.c') 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 + * Copyright © 2013-2015 Thomas White * * 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 */ -- cgit v1.2.3