screen: reset buffer-link on screen-reset
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 23 Oct 2013 13:23:54 +0000 (15:23 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 23 Oct 2013 13:23:54 +0000 (15:23 +0200)
We need to reset the lines-link to main_lines during reset, otherwise the
alternate buffer stays active (which is not what we want).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/tsm_screen.c

index 098b1f9..fc95242 100644 (file)
@@ -890,6 +890,7 @@ void tsm_screen_reset(struct tsm_screen *con)
        con->flags = 0;
        con->margin_top = 0;
        con->margin_bottom = con->size_y - 1;
+       con->lines = con->main_lines;
 
        for (i = 0; i < con->size_x; ++i) {
                if (i % 8 == 0)