diff -r 1c6b099ead89 src/edit.c
--- a/src/edit.c	Sun May 27 00:37:51 2012 +0200
+++ b/src/edit.c	Mon May 28 23:41:09 2012 +0400
@@ -10108,7 +10108,7 @@
 do_insert_char_pre(c)
     int c;
 {
-    char_u *res;
+    char_u *res = NULL, *old;
 
     /* Return quickly when there is nothing to do. */
     if (!has_insertcharpre())
@@ -10118,13 +10118,15 @@
     ++textlock;
     set_vim_var_char(c);  /* set v:char */
 
+    old = vim_strsave(get_vim_var_str(VV_CHAR));
+
     if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf))
 	/* Get the new value of v:char.  It may be empty or more than one
 	 * character. */
-	res = vim_strsave(get_vim_var_str(VV_CHAR));
-    else
-	res = NULL;
-
+	if (old && strcmp(old, get_vim_var_str(VV_CHAR)))
+	    res = vim_strsave(get_vim_var_str(VV_CHAR));
+
+    vim_free(old);
     set_vim_var_string(VV_CHAR, NULL, -1);  /* clear v:char */
     --textlock;
 
