aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-03 21:59:28 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-03 22:41:09 +0800
commite8107f07486ce9dffdc020baf12836e55bf90ce5 (patch)
tree1c31b0eddbfe3c87c644a8c676a1c24a334ce65f /src/nvim/getchar.c
parent7211d8ef21cd93365c5f0582c5a0115e84c011ce (diff)
downloadrneovim-e8107f07486ce9dffdc020baf12836e55bf90ce5.tar.gz
rneovim-e8107f07486ce9dffdc020baf12836e55bf90ce5.tar.bz2
rneovim-e8107f07486ce9dffdc020baf12836e55bf90ce5.zip
vim-patch:8.2.4498: using <Plug> with "noremap" does not work
Problem: Using <Plug> with "noremap" does not work. Solution: Always remap <Plug>. (closes vim/vim#9879, closes vim/vim#9789) https://github.com/vim/vim/commit/1fc34225acbee5ddca2b9ec3f82b3014d385b7f8
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;
}