aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-11-28 15:48:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-11-28 15:48:30 +0000
commita55a3daae7280350f413bcb7570104480fcbebcd (patch)
treef388a9ec6c62b0add93f573c4a63dd09cd000d26 /input.c
parentMerge branch 'kitty-kbd' (diff)
input: regression: special keys don’t reset view and cancel selection
This fixes an issue where e.g. holding down ctrl would cancel the selection, thus making it impossible to copy text to the clipboard.
Diffstat (limited to 'input.c')
-rw-r--r--input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/input.c b/input.c
index f97deb93..0c981376 100644
--- a/input.c
+++ b/input.c
@@ -1594,8 +1594,10 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial,
if (utf8 != buf)
free(utf8);
- term_reset_view(term);
- selection_cancel(term);
+ if (count > 0) {
+ term_reset_view(term);
+ selection_cancel(term);
+ }
maybe_repeat:
clock_gettime(