From c7658b5a7c5ecbabb3390844f19ba43626825554 Mon Sep 17 00:00:00 2001 From: mbkma Date: Sat, 15 Aug 2020 23:32:32 +0200 Subject: Clear answer if editing right before it --- src/math-equation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/math-equation.c b/src/math-equation.c index ac70948..9b46e73 100644 --- a/src/math-equation.c +++ b/src/math-equation.c @@ -1859,8 +1859,8 @@ pre_insert_text_cb(MathEquation *equation, offset = gtk_text_iter_get_offset(location); get_ans_offsets(equation, &ans_start, &ans_end); - /* Inserted inside ans */ - if (offset > ans_start && offset < ans_end) + /* Inserted inside or right before ans */ + if (offset >= ans_start && offset < ans_end) clear_ans(equation, TRUE); } } -- cgit v1.2.1