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

@@ -2066,7 +2066,7 @@ char *nlua_register_table_as_callable(const typval_T *const arg)
void nlua_execute_on_key(int c)
{
char buf[NUMBUFLEN];
char buf[MB_MAXBYTES * 3 + 4];
size_t buf_len = special_to_buf(c, mod_mask, false, buf);
lua_State *const lstate = global_lstate;