csi: multi-cursor: allocate grid->num_rows rows

This way, we can safely index with any correctly wrapped row number
This commit is contained in:
Daniel Eklöf 2025-08-31 09:22:30 +02:00
parent 8bfbbc89fd
commit 7dbccefeea
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
csi.c
View file

@ -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));
}
}