Hi Bram!
On Mi, 20 Jan 2016, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > patch should look like this (repost for vim-dev ml)
> > ```patch
> > diff --git a/src/getchar.c b/src/getchar.c
> > index 70829e1..b06c38d 100644
> > --- a/src/getchar.c
> > +++ b/src/getchar.c
> > @@ -2149,7 +2149,9 @@ vgetorpeek(advance)
> > else
> > {
> > LANGMAP_ADJUST(c1,
> > - (State & (CMDLINE | INSERT)) ==
> > 0);
> > + ((State & (CMDLINE | INSERT) &&
> > + get_real_state() != SELECTMODE)
> > + ) == 0);
> > nolmaplen = 0;
> > }
> > #endif
> > ```
> Thanks!
>
> Bonus points for a test?
Hm, that was wrong. Not sure, why I thought this fixes it. Good you
asked for a test.
Updated patch attached.
Best,
Christian
--
Im Leben lernt der Mensch zuerst das Gehen und Sprechen. Später lernt
er dann stillzusitzen und den Mund zu halten.
-- Marcel Pagnol
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
commit e0f6e7ff3d7137bde651bb19f22e82ff2814e2b5
Author: Christian Brabandt <[email protected]>
Date: Thu Jan 21 22:38:51 2016 +0100
fix issue #572
diff --git a/src/normal.c b/src/normal.c
index ac1a391..17cb8d6 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -638,7 +638,7 @@ normal_cmd(oap, toplevel)
* Get the command character from the user.
*/
c = safe_vgetc();
- LANGMAP_ADJUST(c, TRUE);
+ LANGMAP_ADJUST(c, get_real_state() != SELECTMODE);
/*
* If a mapping was started in Visual or Select mode, remember the length
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index e89afb4..705301d 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -5,6 +5,7 @@ source test_backspace_opt.vim
source test_cursor_func.vim
source test_delete.vim
source test_expand.vim
+source test_langmap.vim
source test_lispwords.vim
source test_menu.vim
source test_searchpos.vim
diff --git a/src/testdir/test_langmap.vim b/src/testdir/test_langmap.vim
new file mode 100644
index 0000000..2c4ea49
--- /dev/null
+++ b/src/testdir/test_langmap.vim
@@ -0,0 +1,11 @@
+" Tests for 'langmap'
+
+func Test_langmap()
+ new
+ $put ='foobar foobar foobar'
+ set langmap=ab
+ :2
+ :norm! gHaaa
+ call assert_equal(getline(1,'$'), ['','aaa'])
+
+endfunc