aboutsummaryrefslogtreecommitdiff
path: root/libstorycode
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-03-21 22:36:10 +0100
committerThomas White <taw@bitwiz.me.uk>2019-03-21 22:36:10 +0100
commit2d34695fd69d5c31f58cab56d135d487a6389267 (patch)
treef725ba6158f1f02fa41992353192e5594b63ecc9 /libstorycode
parent8c48c626819740a1eb450a1b80945dc7f2a191e2 (diff)
Update PangoLayout before moving cursor after text insertion
Diffstat (limited to 'libstorycode')
-rw-r--r--libstorycode/gtk/gtkslideview.c3
1 files changed, 2 insertions, 1 deletions
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);