sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 44ccadcde30136253b7623a8eb2f17883d725d43
parent 4b9c6645f548fc65c86c7980dffcb074182423da
Author: Samadi van Koten <samadi@vktec.co.uk>
Date:   Sun, 28 Jan 2018 14:51:38 +0000

Fix line buffering issue with ed prompt

This fixes an issue whereby ed would not output the prompt (when
enabled) until after exitting due to stdout being line-buffered.

Diffstat:
Med.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ed.c b/ed.c @@ -1374,8 +1374,10 @@ edit(void) ocurln = curln; cmdsiz = 0; repidx = -1; - if (optprompt) + if (optprompt) { fputs(prompt, stdout); + fflush(stdout); + } getlst(); chkglobal() ? doglobal() : docmd(); }