From 6cb58d80203fab0f58e8e0863d6c17f9fbaf6ea3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 28 Mar 2018 14:51:54 +0200 Subject: Rearrange editability checks when inserting text Makes "insert into non-text paragraph" work again --- src/frame.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/frame.c') diff --git a/src/frame.c b/src/frame.c index b87a7c3..ab9e0af 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1024,6 +1024,11 @@ int position_editable(struct frame *fr, struct edit_pos cp) return 0; } + if ( para->type != PARA_TYPE_TEXT ) { + fprintf(stderr, "Paragraph is not text.\n"); + return 0; + } + paraoffs = pos_trail_to_offset(para, cp.pos, cp.trail); run = which_run(para, paraoffs); if ( run == para->n_runs ) { -- cgit v1.2.3