From b62ea55479e6d201da6e3d570c463939c8b87928 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Thu, 10 Apr 2014 18:34:04 -0400 Subject: [PATCH] flushing on input --- terminal.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terminal.d b/terminal.d index 3ca57cf..ae9231a 100644 --- a/terminal.d +++ b/terminal.d @@ -1266,6 +1266,7 @@ struct RealTimeConsoleInput { /// Get one character from the terminal char getch() { + terminal.flush(); import core.stdc.stdio; return cast(char) fgetc(stdin); } @@ -1353,6 +1354,7 @@ struct RealTimeConsoleInput { /// a generic event loop, currently under -version=with_eventloop and it will /// require the module arsd.eventloop (Linux only at this point) InputEvent nextEvent() { + terminal.flush(); if(inputQueue.length) { auto e = inputQueue[0]; inputQueue = inputQueue[1 .. $];