[gnome-calculator] Make sure variables can be defined with whitespaces too



commit 6f239eb9069fa88a91cc1ff661aa7786bcf9feba
Author: Robert Roth <robert roth off gmail com>
Date:   Tue Jun 14 10:11:40 2022 +0300

    Make sure variables can be defined with whitespaces too

 src/math-display.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/math-display.vala b/src/math-display.vala
index 99bdc455..0be137f2 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -212,8 +212,8 @@ public class MathDisplay : Gtk.Box
         /* Solve on [=] if the input is not a variable name */
         if (keyval == Gdk.Key.equal || keyval == Gdk.Key.KP_Equal)
         {
-            if (!(only_variable_name.match((string) equation.equation)
-                || only_function_definition.match((string) equation.equation)))
+            if (!(only_variable_name.match((string) equation.equation.strip())
+                || only_function_definition.match((string) equation.equation.strip())))
             {
                 keyval = Gdk.Key.KP_Enter;
             }


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