about summary refs log tree commit diff stats
path: root/src/kilo.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-14 09:45:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-14 09:48:41 -0800
commit7b91691b1422d20c85983abf2e2ad45cb8f4280b (patch)
tree93facb51323c5a057a64a68b5fd1c90bdf9f10d4 /src/kilo.c
parentb3b844c5f7fa87a86533753f894b8f1835bcabdb (diff)
downloadteliva-7b91691b1422d20c85983abf2e2ad45cb8f4280b.tar.gz
remain in editor on error
Diffstat (limited to 'src/kilo.c')
-rw-r--r--src/kilo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 2c6afbe..d4aa962 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -1123,3 +1123,14 @@ void edit(lua_State* L, char* filename, const char* message) {
         editorProcessKeypress(L);
     }
 }
+
+void resumeEdit(lua_State* L, char* filename, const char* message) {
+    Quit = 0;
+    clearEditor();
+    editorOpen(filename);
+    editorSetStatusMessage(message);
+    while(!Quit) {
+        editorRefreshScreen(editorMenu);
+        editorProcessKeypress(L);
+    }
+}