stop inserting ctrl- keys into programs

This commit is contained in:
Kartik K. Agaram 2021-11-30 17:44:01 -08:00
parent cbe7d1bf40
commit e001212e99
1 changed files with 2 additions and 4 deletions

View File

@ -1149,16 +1149,14 @@ static void editorProcessKeypress(lua_State* L) {
case KEY_RIGHT: case KEY_RIGHT:
editorMoveCursor(c); editorMoveCursor(c);
break; break;
case ESC:
/* Nothing to do for ESC in this mode. */
break;
case TAB: case TAB:
/* insert 2 spaces */ /* insert 2 spaces */
editorInsertChar(' '); editorInsertChar(' ');
editorInsertChar(' '); editorInsertChar(' ');
break; break;
default: default:
editorInsertChar(c); if (c >= ' ')
editorInsertChar(c);
break; break;
} }
} }