summary refs log tree commit diff
path: root/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'edit.c')
-rw-r--r--edit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/edit.c b/edit.c
index fc23c58..3e7e1af 100644
--- a/edit.c
+++ b/edit.c
@@ -260,6 +260,8 @@ void edit(uint id, enum Edit op, wchar_t ch) {
 		}
 
 		break; case EditInsert: {
+			char mb[MB_LEN_MAX];
+			if (wctomb(mb, ch) < 0) return;
 			if (reserve(pos, 1)) {
 				buf[pos++] = ch;
 			}