mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Always send null byte out stdout
If the buffer doesn't exist or if it does, either way make sure to write out a null byte to let the caller know that it is done.
This commit is contained in:
parent
14d13749ad
commit
3be3d4a588
@ -158,10 +158,6 @@ void dump_vt(TMT* outvt) {
|
||||
fflush(stdout);
|
||||
wprintf(L"\x1b[%ld;%ldH", curs->r + 1, curs->c + 1);
|
||||
fflush(stdout);
|
||||
idx = write(1, "\x00", 1);
|
||||
if (idx < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
@ -201,9 +197,11 @@ int main(int argc, char* argv[]) {
|
||||
if (cmd < 0)
|
||||
continue;
|
||||
outvt = get_termentbyname(cmdbuf);
|
||||
if (outvt != NULL) {
|
||||
if (outvt != NULL)
|
||||
dump_vt(outvt);
|
||||
}
|
||||
idx = write(1, "\x00", 1);
|
||||
if (idx < 0)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user