i3 - improved tiling WM


Bugfix: In term-output, clear line before drawing new one

Patch status: merged

Patch by Axel Wagner

Long description:

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.

To apply this patch, use:
curl http://cr.i3wm.org/patch/170/raw.patch | git am

b/i3status.c

16
@@ -442,8 +442,8 @@ int main(int argc, char *argv[]) {
17
                 if (output_format == O_I3BAR)
18
                         yajl_gen_array_open(json_gen);
19
                 else if (output_format == O_TERM)
20
-                        /* Restore the cursor-position */
21
-                        printf("\033[u");
22
+                        /* Restore the cursor-position, clear line */
23
+                        printf("\033[u\033[K");
24
                 for (j = 0; j < cfg_size(cfg, "order"); j++) {
25
                         if (j > 0)
26
                                 print_seperator();