aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--input.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 21baf89b..dcfcb4f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -80,6 +80,7 @@
(https://codeberg.org/dnkl/foot/issues/291).
* Sixel “current geometry” query response not being bounded by the
current window dimensions (fixes `lsix` output)
+* Crash on keyboard input when repeat rate was zero (i.e. no repeat).
### Security
diff --git a/input.c b/input.c
index ffbd7b34..c0fc3522 100644
--- a/input.c
+++ b/input.c
@@ -580,6 +580,9 @@ start_repeater(struct seat *seat, uint32_t key)
if (seat->kbd.repeat.dont_re_repeat)
return true;
+ if (seat->kbd.repeat.rate == 0)
+ return true;
+
struct itimerspec t = {
.it_value = {.tv_sec = 0, .tv_nsec = seat->kbd.repeat.delay * 1000000},
.it_interval = {.tv_sec = 0, .tv_nsec = 1000000000 / seat->kbd.repeat.rate},