mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-16 05:34:00 -04:00
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:
parent
67f97cbca1
commit
749d36d321
1 changed files with 2 additions and 2 deletions
4
input.c
4
input.c
|
|
@ -434,7 +434,7 @@ execute_binding(struct seat *seat, struct terminal *term,
|
||||||
|
|
||||||
term_damage_view(term);
|
term_damage_view(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1689,7 +1689,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
|
||||||
if (utf8 != buf)
|
if (utf8 != buf)
|
||||||
free(utf8);
|
free(utf8);
|
||||||
|
|
||||||
if (handled) {
|
if (handled && !keysym_is_modifier(sym)) {
|
||||||
term_reset_view(term);
|
term_reset_view(term);
|
||||||
selection_cancel(term);
|
selection_cancel(term);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue