sync state when terminal receive stdout

pull/2/head
fuwa 5 years ago
parent a120963ac8
commit 9c4b3e59f4

@ -251,6 +251,14 @@ class SyncedState extends HookedState {
processInput.add(line);
}
void append(String msg) {
stdout.addLast(msg);
while (stdout.length > config.stdoutLineBufferSize) {
stdout.removeFirst();
}
syncState();
}
void onPageChanged(int value) {
this.pageIndex = value;
}
@ -263,7 +271,7 @@ class SyncedState extends HookedState {
if (!synced) break;
// print('synced: print stdout loop');
stdout.addLast(line);
append(line);
log.info(line);
}
}