Afoid flickering on CLI when using --watch

This commit is contained in:
Thomas Gelf 2014-02-07 10:23:29 +00:00
parent 99cccac052
commit 89f6bedb10
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,7 @@ class Cli extends ApplicationBootstrap
$screen = Screen::instance();
while (true) {
Benchmark::measure('Watch mode - loop begins');
ob_start();
echo $screen->clear();
$params = clone($this->params);
$loader->dispatch();
@ -159,6 +160,9 @@ class Cli extends ApplicationBootstrap
Benchmark::dump();
}
Benchmark::reset();
$out = ob_get_contents();
ob_end_clean();
echo $screen->clear() . $out;
$this->params = $params;
sleep($this->watchTimeout);
}