From 945c769daf791b51ad9a2fdca4b3641d1eadac40 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 3 Nov 2013 16:44:16 +0100 Subject: [PATCH] Fix ^C not clearing the line buffer. --- sortix/logterminal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sortix/logterminal.cpp b/sortix/logterminal.cpp index a6b74226..47e32576 100644 --- a/sortix/logterminal.cpp +++ b/sortix/logterminal.cpp @@ -130,6 +130,8 @@ namespace Sortix if ( kbkey == -KBKEY_LCTRL ) { control = false; } if ( mode & TERMMODE_SIGNAL && control && kbkey == KBKEY_C ) { + while ( linebuffer.CanBackspace() ) + linebuffer.Backspace(); pid_t pid = Process::HackGetForegroundProcess(); Process* process = Process::Get(pid); if ( process )