From 7dbccefeeaa7ad86a4461e831468b709b0156b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 31 Aug 2025 09:22:30 +0200 Subject: [PATCH] csi: multi-cursor: allocate grid->num_rows rows This way, we can safely index with any correctly wrapped row number --- csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csi.c b/csi.c index 82078cdf..79b0b97b 100644 --- a/csi.c +++ b/csi.c @@ -2324,7 +2324,7 @@ csi_dispatch(struct terminal *term, uint8_t final) } else { if (term->multi_cursor.shapes == NULL) { term->multi_cursor.shapes = xcalloc( - term->cols * term->rows, + term->grid->num_cols * term->grid->num_rows, sizeof(enum multi_cursor_shape)); } }