mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-06-30 13:14:56 -04:00
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...
This commit is contained in:
parent
22ea71117c
commit
01b3e7ed92
1 changed files with 2 additions and 2 deletions
4
csi.c
4
csi.c
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue