[gcalctool] Fix bug where backspace deletes all input in locales with no thousands separator



commit ccffdf7858194b79e1d5aa54bc08c51cc6d36388
Author: Robert Ancell <robert ancell gmail com>
Date:   Mon Feb 22 09:24:53 2010 +1100

    Fix bug where backspace deletes all input in locales with no thousands separator

 NEWS          |    9 +++++++++
 src/display.c |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 1de7e39..1428457 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,15 @@
  *  All Rights Reserved.
  */
  
+Overview of changes in gcalctool 5.29.91
+
+    * Change boolean functions to uppercase (xor -> XOR)
+    
+    * Fix bug where backspace deletes all input in locales with no thousands
+      separator
+
+    * Modernised build system
+ 
 Overview of changes in gcalctool 5.29.90
 
     * Miscellaneous string fixes
diff --git a/src/display.c b/src/display.c
index c9b5ef6..62e9b99 100644
--- a/src/display.c
+++ b/src/display.c
@@ -444,8 +444,8 @@ display_insert(GCDisplay *display, int cursor_start, int cursor_end, const char
             if (cursor_start != cursor_end && cursor >= cursor_start && cursor < cursor_end)
                 use = FALSE;
 
-            /* Ignore thousands separators */
-            if (strncmp(c, v->tsep, strlen(v->tsep)) == 0)
+            /* Ignore thousands separators (if one exists) */
+            if (v->tsep[0] != '\0' && strncmp(c, v->tsep, strlen(v->tsep)) == 0)
                 use = FALSE;
 
             /* Copy existing text */



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