mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 12:31:45 +08:00
Only clear ScreenCount if write() succeeded.
This commit is contained in:
parent
c7a6ff9317
commit
4bc12834fe
@ -154,9 +154,13 @@ static void tty_flush(void)
|
|||||||
{
|
{
|
||||||
ssize_t res;
|
ssize_t res;
|
||||||
|
|
||||||
if (ScreenCount) {
|
if (!ScreenCount)
|
||||||
if (!el_no_echo)
|
return;
|
||||||
|
|
||||||
|
if (!el_no_echo) {
|
||||||
res = write(el_outfd, Screen, ScreenCount);
|
res = write(el_outfd, Screen, ScreenCount);
|
||||||
|
|
||||||
|
if (res > 0)
|
||||||
ScreenCount = 0;
|
ScreenCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user