aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/gtk/gtkslideview.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstorycode/gtk/gtkslideview.c')
-rw-r--r--libstorycode/gtk/gtkslideview.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libstorycode/gtk/gtkslideview.c b/libstorycode/gtk/gtkslideview.c
index f3d7d59..913fd56 100644
--- a/libstorycode/gtk/gtkslideview.c
+++ b/libstorycode/gtk/gtkslideview.c
@@ -970,13 +970,14 @@ static void insert_text(char *t, GtkSlideView *e)
}
if ( strcmp(t, "\n") == 0 ) {
- //split_paragraph_at_cursor(n, e->cpos);
- //rewrap_range(e, e->cpos.para, e->cpos.para+1);
- //update_size(e);
- //cursor_moveh(n, &e->cpos, +1);
- //check_cursor_visible(e);
- //emit_change_sig(e);
- //redraw(e);
+ off = pos_trail_to_offset(e->cursor_frame, e->cpos.para,
+ e->cpos.pos, e->cpos.trail);
+ slide_item_split_text_paragraph(e->cursor_frame, e->cpos.para, off);
+ e->cpos.para++;
+ e->cpos.pos = 0;
+ e->cpos.trail = 0;
+ emit_change_sig(e);
+ redraw(e);
return;
}