aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-09 15:32:34 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-09 15:32:34 +0000
commitbf57d0c60691963e597408827b74646d368658ec (patch)
tree20f6b6e2e8b49f7104c8dc358e818081bbfe3386 /csi.c
parentunicode combining: don't log overflow errors unless LOG_ENABLE_DBG == 1 (diff)
csi: \E[3J: reset render.last_cursor.row if necessary
This fixes a crash that occurred when the last rendered cursor cell had scrolled off screen, and \E[3J (clear scrollback) was executed.
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/csi.c b/csi.c
index 56346e6e..37400953 100644
--- a/csi.c
+++ b/csi.c
@@ -506,6 +506,9 @@ csi_dispatch(struct terminal *term, uint8_t final)
continue;
}
+ if (term->render.last_cursor.row == term->grid->rows[i])
+ term->render.last_cursor.row = NULL;
+
grid_row_free(term->grid->rows[i]);
term->grid->rows[i] = NULL;
}