aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-01 23:46:04 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-11 15:27:55 +0100
commitca24ad0b95c7f6360b3c4b732911558361bff3fe (patch)
tree9ceab9129ed4fe244a66318664afc44a8120ad4f /src/nvim/ex_getln.c
parentc8356e1151cf6db8cad93f74973a7452e62d6be0 (diff)
downloadrneovim-ca24ad0b95c7f6360b3c4b732911558361bff3fe.tar.gz
rneovim-ca24ad0b95c7f6360b3c4b732911558361bff3fe.tar.bz2
rneovim-ca24ad0b95c7f6360b3c4b732911558361bff3fe.zip
vim-patch:8.0.0689: ~ character not escaped when extending search pattern
Problem: The ~ character is not escaped when adding to the search pattern with CTRL-L. (Ramel Eshed) Solution: Escape the character. (Christian Brabandt) https://github.com/vim/vim/commit/a693d0584b9a7ccce98813dda3a6badb209904c7
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 40b4cc6d79..bbe1d22473 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1549,7 +1549,7 @@ static int command_line_handle_key(CommandLineState *s)
}
if (s->c != NUL) {
if (s->c == s->firstc
- || vim_strchr((char_u *)(p_magic ? "\\^$.*[" : "\\^$"), s->c)
+ || vim_strchr((char_u *)(p_magic ? "\\~^$.*[" : "\\^$"), s->c)
!= NULL) {
// put a backslash before special characters
stuffcharReadbuff(s->c);