about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-03-12 15:35:49 -0500
committerJune McEnroe <june@causal.agency>2022-03-12 15:35:49 -0500
commitccab8e23333b031002c8ddbd8a0e77556f05da41 (patch)
tree6bd46db197d5a8bb48b776bbcfed6352481cef2b
parentImplement basic esc/i mode switching (diff)
downloadcatgirl-ccab8e23333b031002c8ddbd8a0e77556f05da41.tar.gz
catgirl-ccab8e23333b031002c8ddbd8a0e77556f05da41.zip
Reset to vi insert mode on enter
-rw-r--r--input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/input.c b/input.c
index 2662cda..07b8b89 100644
--- a/input.c
+++ b/input.c
@@ -413,6 +413,10 @@ static void inputEnter(void) {
 
 	tabAccept();
 	editFn(&edits[id], EditClear);
+	if (inputMode == InputVi) {
+		editVi(&edits[id], L'\33');
+		editVi(&edits[id], L'i');
+	}
 	command(id, cmd);
 }