From 24f4ce9669ab7746abb2ba4e7eff62897c821bf1 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 26 Apr 2023 20:42:26 +0200 Subject: [PATCH] kernel: Only allow Ctrl+D on an empty line --- kernel/src/fs/devices/ConsoleDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/fs/devices/ConsoleDevice.cpp b/kernel/src/fs/devices/ConsoleDevice.cpp index c37143e9..dda6d021 100644 --- a/kernel/src/fs/devices/ConsoleDevice.cpp +++ b/kernel/src/fs/devices/ConsoleDevice.cpp @@ -59,7 +59,7 @@ void ConsoleDevice::did_press_key(char key) // Ctrl+D if (key == 'd' && (Keyboard::modifiers() & Keyboard::LeftControl)) { - g_eof = true; + if (g_temp_input.size() == 0) g_eof = true; return; }