diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2026-06-24 11:03:14 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-06-24 11:03:14 +0000 |
| commit | 01b3e7ed9271e49ae571918a912e0783d272abac (patch) | |
| tree | 1968fe63be7969735d92238093cc88c977e43b54 | |
| parent | config: font_parse(): handle font family names with \-:, (diff) | |
csi: kitty: limit pop count to the size of the flag stack
It's circular, but there's no need to walk through it more than
once...
csi: kitty: limit pop count to the size of the flag stack
It's circular, but there's no need to walk through it more than
once...
| -rw-r--r-- | csi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1769,10 +1769,10 @@ csi_dispatch(struct terminal *term, uint8_t final) case '<': { switch (final) { case 'u': { - int count = vt_param_get(term, 0, 1); + struct grid *grid = term->grid; + int count = min(vt_param_get(term, 0, 1), ALEN(grid->kitty_kbd.flags)); LOG_DBG("kitty kbd: popping %d levels of flags", count); - struct grid *grid = term->grid; uint8_t idx = grid->kitty_kbd.idx; for (int i = 0; i < count; i++) { |
