diff -dur gucharmap-3.12.1/gucharmap/gucharmap-window.c gucharmap-3.12.1-avoid-io/gucharmap/gucharmap-window.c
--- gucharmap-3.12.1/gucharmap/gucharmap-window.c	2014-05-13 04:56:33.000000000 +1000
+++ gucharmap-3.12.1-avoid-io/gucharmap/gucharmap-window.c	2014-08-03 15:25:39.618736756 +1000
@@ -649,17 +649,6 @@
   gtk_widget_set_size_request (guw->status, -1, allocation->height + 9);
 }
 
-static gboolean
-save_last_char_idle_cb (GucharmapWindow *guw)
-{
-  guw->save_last_char_idle_id = 0;
-
-  g_settings_set_uint (guw->settings, "last-char", 
-                       gucharmap_charmap_get_active_character (guw->charmap));
-
-  return FALSE;
-}
-
 static void
 fontsel_sync_font_desc (GucharmapMiniFontSelection *fontsel,
                         GParamSpec *pspec,
@@ -700,15 +689,25 @@
   guw->in_notification = FALSE;
 }
 
+static int last_char_dirty = 0;
+
 static void
-charmap_sync_active_character (GtkWidget *widget,
-                               GParamSpec *pspec,
+charmap_dirty_active_character (GtkWidget *widget,
+                                GParamSpec *pspec,
+                                GucharmapWindow *guw)
+{
+  last_char_dirty = 1;
+}
+
+static gboolean
+charmap_save_active_character (GtkWidget *widget,
                                GucharmapWindow *guw)
 {
-  if (guw->save_last_char_idle_id != 0)
-    return;
+  if (last_char_dirty)
+    g_settings_set_uint (guw->settings, "last-char", 
+                         gucharmap_charmap_get_active_character (guw->charmap));
 
-  guw->save_last_char_idle_id = g_idle_add ((GSourceFunc) save_last_char_idle_cb, guw);
+  return FALSE;
 }
 
 static void
@@ -854,8 +853,10 @@
   /* connect these only after applying the initial settings in order to
    * avoid unnecessary writes to GSettings.
    */
+  g_signal_connect (guw, "destroy",
+                    G_CALLBACK (charmap_save_active_character), guw);
   g_signal_connect (guw->charmap, "notify::active-character",
-                    G_CALLBACK (charmap_sync_active_character), guw);
+                    G_CALLBACK (charmap_dirty_active_character), guw);
   g_signal_connect (guw->fontsel, "notify::font-desc",
                     G_CALLBACK (fontsel_sync_font_desc), guw);
 }
@@ -865,9 +866,6 @@
 {
   GucharmapWindow *guw = GUCHARMAP_WINDOW (object);
 
-  if (guw->save_last_char_idle_id != 0)
-    g_source_remove (guw->save_last_char_idle_id);
-
   if (guw->page_setup)
     g_object_unref (guw->page_setup);
 
diff -dur gucharmap-3.12.1/gucharmap/gucharmap-window.h gucharmap-3.12.1-avoid-io/gucharmap/gucharmap-window.h
--- gucharmap-3.12.1/gucharmap/gucharmap-window.h	2012-05-16 10:25:05.000000000 +1000
+++ gucharmap-3.12.1-avoid-io/gucharmap/gucharmap-window.h	2014-08-03 15:23:51.728522219 +1000
@@ -49,8 +49,6 @@
 
   GtkWidget *search_dialog; /* takes care of all aspects of searching */
 
-  guint save_last_char_idle_id;
-
   GtkPageSetup *page_setup;
   GtkPrintSettings *print_settings;
 
