summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2015-07-10 17:19:30 +0200
committerBram Moolenaar <bram@vim.org>2015-07-10 17:19:30 +0200
commit20e44bbeb2685d8718b1651e4aef3ab4ae811795 (patch)
tree41b41238d4454894e4345510a03739e32747edc9
parente5015e2bd2406e2f8cd2901fedad41d4d02370b2 (diff)
downloadvim-20e44bbeb2685d8718b1651e4aef3ab4ae811795.tar.gz
patch 7.4.773v7.4.773v7-4-773
Problem: 'langmap' is used in command-line mode when checking for mappings. Issue 376. Solution: Do not use 'langmap' in command-line mode. (Larry Velazquez)
-rw-r--r--src/getchar.c3
-rw-r--r--src/testdir/test_mapping.in11
-rw-r--r--src/testdir/test_mapping.ok2
-rw-r--r--src/version.c2
4 files changed, 16 insertions, 2 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 54bce315..a80432fc 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2145,7 +2145,8 @@ vgetorpeek(advance)
nolmaplen = 2;
else
{
- LANGMAP_ADJUST(c1, (State & INSERT) == 0);
+ LANGMAP_ADJUST(c1,
+ (State & (CMDLINE | INSERT)) == 0);
nolmaplen = 0;
}
#endif
diff --git a/src/testdir/test_mapping.in b/src/testdir/test_mapping.in
index 97918439..d6c1b2d5 100644
--- a/src/testdir/test_mapping.in
+++ b/src/testdir/test_mapping.in
@@ -28,9 +28,18 @@ GV
:inoremap { FAIL_ilangmap
:set langmap=+{ langnoremap
o+
-: " expr mapping with langmap
+:" Insert-mode expr mapping with langmap
:inoremap <expr> { "FAIL_iexplangmap"
o+
+:" langmap should not get remapped in Command-line mode
+:cnoremap { FAIL_clangmap
+:call append(line('$'), '+')
+:cunmap {
+:" Command-line mode expr mapping with langmap
+:cnoremap <expr> { "FAIL_cexplangmap"
+:call append(line('$'), '+')
+:cunmap {
+:"
:" issue #212 (feedkeys insert mapping at current position)
:nnoremap . :call feedkeys(".", "in")<cr>
:/^a b
diff --git a/src/testdir/test_mapping.ok b/src/testdir/test_mapping.ok
index 6a88f02d..51cc49bf 100644
--- a/src/testdir/test_mapping.ok
+++ b/src/testdir/test_mapping.ok
@@ -8,3 +8,5 @@ TEST2: CTRL-C |<ctrl-c>A|
vmap works
+
+
++
++
diff --git a/src/version.c b/src/version.c
index a43046e9..8ab862ac 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 773,
+/**/
772,
/**/
771,