From 9d64e3e3cbe2771a5c2787cdcad8f9372e6b3040 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 24 Apr 2026 14:00:20 -0400 Subject: pad cooldown: lax punctuation word position --- src/spreed.c | 11 +++++++++-- test.txt | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/spreed.c b/src/spreed.c index 406c288..0ec2971 100755 --- a/src/spreed.c +++ b/src/spreed.c @@ -172,8 +172,15 @@ END_OF_WORD: fflush(stdout); - if (word[iword-1] == L'.') { - cooldown += wpm_ns; + while (iword > 0) { + if (iswalnum(word[iword-1])) { + break; + } + if (word[iword-1] == L'.' || word[iword-1] == L'!' || word[iword-1] == L'?') { + cooldown += wpm_ns; + break; + } + iword--; } cooldown += wpm_ns; diff --git a/test.txt b/test.txt index ed00213..207eb45 100644 --- a/test.txt +++ b/test.txt @@ -1,4 +1,5 @@ this ain't workin. +https://google.com 1 22 333 -- cgit v1.2.3