diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-05-08 00:03:29 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-05-08 00:03:29 -0300 |
commit | 137f5f6bbe935e71ca66bb9aafd0114aaab654f0 (patch) | |
tree | c2e9f089d8e844733567a8d5763452f53748b615 | |
parent | 6fcf9534df7881d7d9822a85dba62b4efc6d9007 (diff) | |
download | jet-137f5f6bbe935e71ca66bb9aafd0114aaab654f0.tar.gz jet-137f5f6bbe935e71ca66bb9aafd0114aaab654f0.zip |
Add quit key binding
-rw-r--r-- | jet.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -37,7 +37,8 @@ int main(int argc, char *argv[]) { int mode = NORMAL_MODE; - while (1) { + int quit = 0; + while (!quit) { clear(); int x = -1, y = -1; @@ -57,6 +58,9 @@ int main(int argc, char *argv[]) { if (mode == NORMAL_MODE) { switch (input) { + case '': + quit = 1; + break; case 'i': mode = INSERT_MODE; break; |