about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/kilo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 1e1172a..6df16e5 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -1149,16 +1149,14 @@ static void editorProcessKeypress(lua_State* L) {
     case KEY_RIGHT:
         editorMoveCursor(c);
         break;
-    case ESC:
-        /* Nothing to do for ESC in this mode. */
-        break;
     case TAB:
         /* insert 2 spaces */
         editorInsertChar(' ');
         editorInsertChar(' ');
         break;
     default:
-        editorInsertChar(c);
+        if (c >= ' ')
+            editorInsertChar(c);
         break;
     }
 }