From 2d34695fd69d5c31f58cab56d135d487a6389267 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Mar 2019 22:36:10 +0100 Subject: Update PangoLayout before moving cursor after text insertion --- libstorycode/gtk/gtkslideview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstorycode/gtk/gtkslideview.c b/libstorycode/gtk/gtkslideview.c index 8452b94..4a0102f 100644 --- a/libstorycode/gtk/gtkslideview.c +++ b/libstorycode/gtk/gtkslideview.c @@ -983,7 +983,8 @@ static void insert_text(char *t, GtkSlideView *e) off = pos_trail_to_offset(e->cursor_frame, e->cpos.para, e->cpos.pos, e->cpos.trail); insert_text_in_paragraph(e->cursor_frame, e->cpos.para, off, t); - /* FIXME: PangoLayout needs to be reconstructed before the following */ + pango_layout_set_text(e->cursor_frame->layouts[e->cpos.para], + e->cursor_frame->paragraphs[e->cpos.para], -1); cursor_moveh(e, &e->cpos, +1); emit_change_sig(e); redraw(e); -- cgit v1.2.3