aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/keymap.c6
-rw-r--r--src/nvim/testdir/test_expr.vim5
-rw-r--r--src/nvim/version.c2
3 files changed, 10 insertions, 3 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;
}
}
}
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 7483973fca..189ecce2fe 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -92,3 +92,8 @@ endfunc
func Test_set_reg_null_list()
call setreg('x', v:_null_list)
endfunc
+
+func Test_special_char()
+ " The failure is only visible using valgrind.
+ call assert_fails('echo "\<C-">')
+endfunc
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 3532d3dfab..70abbcef76 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -472,7 +472,7 @@ static int included_patches[] = {
1971,
1970,
// 1969 NA
- // 1968,
+ 1968,
1967,
1966,
// 1965 NA