about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lcurses/window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lcurses/window.c b/src/lcurses/window.c
index 72680d5..8d3d5f1 100644
--- a/src/lcurses/window.c
+++ b/src/lcurses/window.c
@@ -1313,8 +1313,10 @@ Wgetch(lua_State *L)
 
 	if (c == ERR)
 		return 0;
-	if (c == CTRL_X)
+	if (c == CTRL_X) {
+		unlink("teliva_editor_state");
 		exit(0);
+	}
 	if (c == CTRL_E)
 		switch_to_editor(L);
 	/* handle other standard menu hotkeys here */