diff options
| author | Axel Wagner <mail@merovius.de> | 2013-06-11 16:08:14 +0200 | 
|---|---|---|
| committer | Michael Stapelberg <michael@stapelberg.de> | 2013-06-11 23:50:29 +0200 | 
| commit | 86d1b5df7a0f20b02b5e09ad9cdbf898a65e07c5 (patch) | |
| tree | e93b6444545f4acebfb581dfb6a57b8bc667702f | |
| parent | 3beb6b44062811ce7c87c13331899b9f3be9e348 (diff) | |
Bugfix: In term-output, clear line before drawing new one
If we don't do this, the output of i3status will remain on the terminal,
which is really ugly if the statusline becomes shorter after a while
(for example a connection get's lost), because there will be garbage.
| -rw-r--r-- | i3status.c | 4 | 
1 files changed, 2 insertions, 2 deletions
@@ -442,8 +442,8 @@ int main(int argc, char *argv[]) {                  if (output_format == O_I3BAR)                          yajl_gen_array_open(json_gen);                  else if (output_format == O_TERM) -                        /* Restore the cursor-position */ -                        printf("\033[u"); +                        /* Restore the cursor-position, clear line */ +                        printf("\033[u\033[K");                  for (j = 0; j < cfg_size(cfg, "order"); j++) {                          if (j > 0)                                  print_seperator();  | 
