shell: improve displaying of pulse (#11130)

- output "[...]" to indicate throttling is being used, instead of just
  an empty line
- go to beginning of line after displaying the pulse, so that following
  output is displayed over it
This commit is contained in:
Daniel Hahler 2019-10-02 06:26:57 +02:00 committed by GitHub
parent 333dc3d138
commit 0c1be45ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,10 +423,11 @@ static bool out_data_decide_throttle(size_t size)
pulse_msg[1] = (tick > 1) ? '.' : ' ';
pulse_msg[2] = (tick > 2) ? '.' : ' ';
if (visit == 1) {
msg_putchar('\n');
msg_puts("[...]\n");
}
msg_putchar('\r'); // put cursor at start of line
msg_puts(pulse_msg);
msg_putchar('\r');
ui_flush();
return true;
}