aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mapping.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-26 11:20:37 +0800
committerGitHub <noreply@github.com>2022-12-26 11:20:37 +0800
commit357aab4c65c49a924481a67e17a10bd04c334ab9 (patch)
treef800d7e1836a660c508e8888976937fbf860f066 /src/nvim/mapping.c
parent6f25623e793e058c78481b7fb7a42eeff642694b (diff)
downloadrneovim-357aab4c65c49a924481a67e17a10bd04c334ab9.tar.gz
rneovim-357aab4c65c49a924481a67e17a10bd04c334ab9.tar.bz2
rneovim-357aab4c65c49a924481a67e17a10bd04c334ab9.zip
fix(mappings): use all buckets in second round of unmap (#21534)
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r--src/nvim/mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c
index a412fd05b2..5fffc72056 100644
--- a/src/nvim/mapping.c
+++ b/src/nvim/mapping.c
@@ -693,7 +693,7 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev,
for (int round = 0; (round == 0 || maptype == MAPTYPE_UNMAP) && round <= 1
&& !did_it && !got_int; round++) {
int hash_start, hash_end;
- if (has_lhs || is_abbrev) {
+ if ((round == 0 && has_lhs) || is_abbrev) {
// just use one hash
hash_start = is_abbrev ? 0 : MAP_HASH(mode, (uint8_t)lhs[0]);
hash_end = hash_start + 1;