[gnome-calculator] Clear answer if editing right before it (fixes #59, fixes #161)



commit 86976fa91e8693f6a7fe3ce6c6ea1f8fe9416eb7
Author: Robert Roth <robert roth off gmail com>
Date:   Fri Jun 5 17:37:07 2020 +0300

    Clear answer if editing right before it (fixes #59, fixes #161)

 lib/math-equation.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index ae71e706..65570880 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -1411,6 +1411,9 @@ public class MathEquation : Gtk.SourceBuffer
             /* Inserted inside ans */
             if (offset > ans_start && offset < ans_end)
                 clear_ans (true);
+            /* Inserted before ans */
+            if (offset == ans_start)
+                clear_ans (true);
         }
 
         base.insert_text (ref location, text, len);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]