diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2025-03-07 17:49:54 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-08 05:45:39 +0800 |
| commit | 12d4caa9d3e4224b7c2922f112955100649d6069 (patch) | |
| tree | 5a0e5a22c30d7c003114bd66489b8f75c62125e4 /src/nvim/keycodes.lua | |
| parent | af42f79221af793adeb8c2552463a87ddde08a7e (diff) | |
| download | rneovim-12d4caa9d3e4224b7c2922f112955100649d6069.tar.gz rneovim-12d4caa9d3e4224b7c2922f112955100649d6069.tar.bz2 rneovim-12d4caa9d3e4224b7c2922f112955100649d6069.zip | |
perf(keycodes): use hashy for string lookup
This is slightly faster than the binary search as per the benchmark, and
allows handling the vim/vim#16821 situation in generator code.
Diffstat (limited to 'src/nvim/keycodes.lua')
| -rw-r--r-- | src/nvim/keycodes.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/keycodes.lua b/src/nvim/keycodes.lua index c6158b0b84..04f09eb005 100644 --- a/src/nvim/keycodes.lua +++ b/src/nvim/keycodes.lua @@ -1,5 +1,7 @@ return { --- @type [string, string][] List of [key, name] tuples. + --- For keys with multiple names, put the preferred name first. + --- For multiple keys with the same name, put the preferred key first. names = { { [[' ']], 'Space' }, { [[TAB]], 'Tab' }, |