aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keymap.c
diff options
context:
space:
mode:
authorShougo <Shougo.Matsu@gmail.com>2017-01-15 09:08:27 +0900
committerJustin M. Keyes <justinkz@gmail.com>2017-01-15 01:08:27 +0100
commitc88e4a270d54eae3fe8e6b93a0ed3898e4632be5 (patch)
treecba9412197e3bb14c826803b69211420a774fef3 /src/nvim/keymap.c
parentb98da8de9823301dc2cb2f5fd14122a8afbcd50f (diff)
downloadrneovim-c88e4a270d54eae3fe8e6b93a0ed3898e4632be5.tar.gz
rneovim-c88e4a270d54eae3fe8e6b93a0ed3898e4632be5.tar.bz2
rneovim-c88e4a270d54eae3fe8e6b93a0ed3898e4632be5.zip
vim-patch:7.4.1968 (#5949)
Problem: Invalid memory access with "\<C-">. Solution: Do not recognize this as a special character. (Dominique Pelle) https://github.com/vim/vim/commit/1d90a5a5af84250e226f8a9121e771f7b72aa894
Diffstat (limited to 'src/nvim/keymap.c')
-rw-r--r--src/nvim/keymap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/keymap.c b/src/nvim/keymap.c
index 99e94fc60f..94bbaf4239 100644
--- a/src/nvim/keymap.c
+++ b/src/nvim/keymap.c
@@ -573,8 +573,10 @@ int find_special_key(const char_u **srcp, const size_t src_len, int *const modp,
} else {
l = 1;
}
- if (end - bp > l && bp[l + 1] == '>') {
- bp += l; // anything accepted, like <C-?>
+ if (end - bp > l && bp[l] != '"' && bp[l + 1] == '>') {
+ // Anything accepted, like <C-?>, except <C-">, because the "
+ // ends the string.
+ bp += l;
}
}
}