test: add a bit more testing for vim.on_key() (#28095)

Also:
- Don't use NUMBUFLEN as buffer length as its unrelated.
- Restore accidentally removed comment from last commit.
This commit is contained in:
zeertzjq
2024-03-29 18:37:07 +08:00
committed by GitHub
parent fc19ee01ac
commit f29c41d665
5 changed files with 23 additions and 7 deletions

View File

@@ -1122,6 +1122,8 @@ static void gotchars(const uint8_t *chars, size_t len)
pending--;
}
// When receiving a special key sequence, store it until we have all
// the bytes and we can decide what to do with it.
if ((pending == 0 || in_mbyte) && c == K_SPECIAL) {
pending += 2;
if (!in_mbyte) {