summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmds.c b/src/cmds.c
index f91f91b0bc1..f705f147727 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -356,8 +356,13 @@ internal_self_insert (c, noautofill)
len = CHAR_STRING (c, workbuf, str);
}
else
- workbuf[0] = c, str = workbuf, len = 1;
-
+ {
+ workbuf[0] = (SINGLE_BYTE_CHAR_P (c)
+ ? c
+ : multibyte_char_to_unibyte (c, Qnil));
+ str = workbuf;
+ len = 1;
+ }
if (!NILP (overwrite)
&& PT < ZV)
{