aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-03 23:18:46 +0800
committerGitHub <noreply@github.com>2022-03-03 23:18:46 +0800
commite8d047df816a935f977f403373fb57e7d8eb18a0 (patch)
treeb4c134ad07710d70b6e63b0b7092bd37af970a76 /src/nvim/getchar.c
parentff20d9b10688f9c23f122c7a826b4632e95bbbe2 (diff)
parente8107f07486ce9dffdc020baf12836e55bf90ce5 (diff)
downloadrneovim-e8d047df816a935f977f403373fb57e7d8eb18a0.tar.gz
rneovim-e8d047df816a935f977f403373fb57e7d8eb18a0.tar.bz2
rneovim-e8d047df816a935f977f403373fb57e7d8eb18a0.zip
Merge pull request #17591 from zeertzjq/vim-8.2.4498
vim-patch:8.2.4498: using <Plug> with "noremap" does not work
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 85a5c176bb..8426cdb98c 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1712,11 +1712,10 @@ static int handle_mapping(int *keylenp, bool *timedout, int *mapdepth)
int local_State = get_real_state();
bool is_plug_map = false;
- // Check if typehead starts with a <Plug> mapping.
- // In that case we will ignore nore flag on it.
+ // If typehead starts with <Plug> then remap, even for a "noremap" mapping.
if (typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
- && typebuf.tb_buf[typebuf.tb_off+1] == KS_EXTRA
- && typebuf.tb_buf[typebuf.tb_off+2] == KE_PLUG) {
+ && typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
+ && typebuf.tb_buf[typebuf.tb_off + 2] == KE_PLUG) {
is_plug_map = true;
}