From 3203bf7afffe19128fe107afcae44791d817730b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 28 Nov 2021 21:16:50 -0800 Subject: tab key: always insert two spaces --- src/kilo.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/kilo.c b/src/kilo.c index 1c568d9..4b5e3dc 100644 --- a/src/kilo.c +++ b/src/kilo.c @@ -1145,6 +1145,11 @@ static void editorProcessKeypress(lua_State* L) { case ESC: /* Nothing to do for ESC in this mode. */ break; + case TAB: + /* insert 2 spaces */ + editorInsertChar(' '); + editorInsertChar(' '); + break; default: editorInsertChar(c); break; -- cgit 1.4.1-2-gfad0