Hello Bram,
On 8/16/2016 6:43 PM, Bram Moolenaar wrote:
> Hello Vim users,
>
> Work on Vim 8.0 is coming close to an end.  I hope version 8.0 can be
> released in about two weeks.
>
> This is a last chance to modify new features in a way that is not
> backwards compatible.  Once 8.0 is out we can't make changes that would
> break plugins.
>
> An overview of new features can be found in:
> https://github.com/vim/vim/blob/master/runtime/doc/version8.txt
> A version with links (but a day older):
> http://vimhelp.appspot.com/version8.txt.html
>
> Please review the new features, try them out and report what should be
> changed on the vim-dev maillist.  Of course you should also report bugs
> you find.
>
> Happy Vimming!
>
>
> PS. If you are interested in meeting Vim users: Vimfest is happening in
> Berlin Sept. 16-18.  http://vimfest.org
I was wondering whether you could also include into Vim 8 the following patch
(the original reason for pull request https://github.com/vim/vim/pull/543,
which you can reject, since the langmap part doesn't seem to have a chance in, anyway)
The behavior this patch tries to achieve is given by the test case in the patch.
diff --git src/getchar.c src/getchar.c
index 1c170cc..ce68a2f 100644
--- src/getchar.c
+++ src/getchar.c
@@ -2144,12 +2144,15 @@ vgetorpeek(int advance)
                 /*
                  * Only consider an entry if the first character
                  * matches and it is for the current state.
-                 * Skip ":lmap" mappings if keys were mapped.
                  */
                 if (mp->m_keys[0] == c1
                     && (mp->m_mode & local_State)
-                    && ((mp->m_mode & LANGMAP) == 0
-                    || typebuf.tb_maplen == 0))
+                     /* && ((mp->m_mode & LANGMAP) == 0 ||
typebuf.tb_maplen == 0)
+                      * Used to skip ":lmap" mappings for keymap'ed
keys here,
+                      *   but the result of the keymap is not placed in
the register,
+                      *   so the register content needs to be remapped
here.
+                      */
+                   )
                 {
 #ifdef FEAT_LANGMAP
                 int    nomap = nolmaplen;
diff --git src/testdir/test_digraph.vim src/testdir/test_digraph.vim
index 9550085..3578ced 100644
--- src/testdir/test_digraph.vim
+++ src/testdir/test_digraph.vim
@@ -450,6 +450,20 @@ func! Test_loadkeymap()
   bw!
 endfunc
 
+func! Test_registerkeymap()
+  if !has('keymap')
+    return
+  endif
+  new
+  set keymap=russian-jcukenwin
+  set iminsert=1
+  call feedkeys("qqods\<esc>qdd@q", 'tx')
+  call assert_equal("вы", getline('.'))
+  " reset keymap and encoding option
+  set keymap=
+  bw!
+endfunc
+
 func! Test_digraph_cmndline()
   " Create digraph on commandline
   " This is a hack, to let Vim create the digraph in commandline mode
-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment