From 9c99681ee304b07fce64c7052d011136798d96c7 Mon Sep 17 00:00:00 2001 From: Marco Cutecchia Date: Sun, 27 Apr 2025 10:14:52 +0200 Subject: [PATCH] Enter raw mode before 'getCursorPosition' is called Otherwise kilo will halt at startup because we'll block reading the response until the user types an explicit newline --- kilo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kilo.c b/kilo.c index 0d8aef4e..cd51fc04 100644 --- a/kilo.c +++ b/kilo.c @@ -1294,10 +1294,10 @@ int main(int argc, char **argv) { exit(1); } + enableRawMode(STDIN_FILENO); initEditor(); editorSelectSyntaxHighlight(argv[1]); editorOpen(argv[1]); - enableRawMode(STDIN_FILENO); editorSetStatusMessage( "HELP: Ctrl-S = save | Ctrl-Q = quit | Ctrl-F = find"); while(1) {