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.
This commit is contained in:
parent
4b9c6645f5
commit
44ccadcde3
4
ed.c
4
ed.c
|
@ -1374,8 +1374,10 @@ edit(void)
|
||||||
ocurln = curln;
|
ocurln = curln;
|
||||||
cmdsiz = 0;
|
cmdsiz = 0;
|
||||||
repidx = -1;
|
repidx = -1;
|
||||||
if (optprompt)
|
if (optprompt) {
|
||||||
fputs(prompt, stdout);
|
fputs(prompt, stdout);
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
getlst();
|
getlst();
|
||||||
chkglobal() ? doglobal() : docmd();
|
chkglobal() ? doglobal() : docmd();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user