input: don't clear text selection on modifier keypresses

When kitty keyboard is enabled, pressing a modifier key will clear the
text selection. This makes it difficult to copy text because the
selection clears as soon as the user presses "ctrl".

Tested-by: Robin Jarry <robin@jarry.cc>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-02-22 15:08:13 -06:00
parent 67f97cbca1
commit 749d36d321

View file

@ -434,7 +434,7 @@ execute_binding(struct seat *seat, struct terminal *term,
term_damage_view(term);
render_refresh(term);
break;
break;
}
return true;
@ -1689,7 +1689,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
if (utf8 != buf)
free(utf8);
if (handled) {
if (handled && !keysym_is_modifier(sym)) {
term_reset_view(term);
selection_cancel(term);
}