mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-11 05:33:55 -04:00
input: execute: add missing 'return true' to a couple of switch cases
Without this, the input handling code won't understand the key/mouse event was consumed (i.e. triggered a shortcut), and will continue processing normally (e.g. sending event to the client application).
This commit is contained in:
parent
b78cc92322
commit
e2a989785a
1 changed files with 14 additions and 6 deletions
20
input.c
20
input.c
|
|
@ -120,10 +120,14 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
|
|
||||||
case BIND_ACTION_SCROLLBACK_UP_MOUSE:
|
case BIND_ACTION_SCROLLBACK_UP_MOUSE:
|
||||||
if (term->grid == &term->alt) {
|
if (term->grid == &term->alt) {
|
||||||
if (term->alt_scrolling)
|
if (term->alt_scrolling) {
|
||||||
alternate_scroll(seat, amount, BTN_BACK);
|
alternate_scroll(seat, amount, BTN_BACK);
|
||||||
} else
|
return true;
|
||||||
cmd_scrollback_up(term, amount);
|
}
|
||||||
|
} else {
|
||||||
|
cmd_scrollback_up(term, amount);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BIND_ACTION_SCROLLBACK_DOWN_PAGE:
|
case BIND_ACTION_SCROLLBACK_DOWN_PAGE:
|
||||||
|
|
@ -149,10 +153,14 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
|
|
||||||
case BIND_ACTION_SCROLLBACK_DOWN_MOUSE:
|
case BIND_ACTION_SCROLLBACK_DOWN_MOUSE:
|
||||||
if (term->grid == &term->alt) {
|
if (term->grid == &term->alt) {
|
||||||
if (term->alt_scrolling)
|
if (term->alt_scrolling) {
|
||||||
alternate_scroll(seat, amount, BTN_FORWARD);
|
alternate_scroll(seat, amount, BTN_FORWARD);
|
||||||
} else
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
cmd_scrollback_down(term, amount);
|
cmd_scrollback_down(term, amount);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BIND_ACTION_SCROLLBACK_HOME:
|
case BIND_ACTION_SCROLLBACK_HOME:
|
||||||
|
|
@ -535,7 +543,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
case BIND_ACTION_SELECT_QUOTE:
|
case BIND_ACTION_SELECT_QUOTE:
|
||||||
selection_start(
|
selection_start(
|
||||||
term, seat->mouse.col, seat->mouse.row, SELECTION_QUOTE_WISE, false);
|
term, seat->mouse.col, seat->mouse.row, SELECTION_QUOTE_WISE, false);
|
||||||
break;
|
return true;
|
||||||
|
|
||||||
case BIND_ACTION_SELECT_ROW:
|
case BIND_ACTION_SELECT_ROW:
|
||||||
selection_start(
|
selection_start(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue