Daniel Hahler wrote:
> There's a problem with "langmap" and expression mappings, but also
> normal ones:
>
> :inoremap <expr> } "X"
> :set langmap=+} langnoremap
>
> This will insert "X" when typing "+" in insert mode, but it should be "+".
>
> This is caused / not correctly handled by the "|| (p_lnr &&
> typebuf_maplen() == 0 )" condition in the macro:
>
> # define LANGMAP_ADJUST(c, condition) \
> do { \
> if (*p_langmap \
> && (condition) \
> && (!p_lnr || (p_lnr && typebuf_maplen() == 0 )) \
> && !KeyStuffed \
> && (c) >= 0) \
> { \
> if ((c) < 256) \
> c = langmap_mapchar[c]; \
> else \
> c = langmap_adjust_mb(c); \
> } \
> } while (0)
>
> "typebuf_maplen() == 0" could be written as "typebuf_typed()" btw.
>
> `:call feedkeys('i+')` works (inserts the "+").
>
> A fix for this (with tests) is at:
> https://github.com/blueyed/vim/compare/fix-langmap-in-insmode?expand=1 (and
> attached).
>
> I could imagine that this breaks something, but at least no other tests.
>
> I've noticed this bug with delimitMate:
> https://github.com/Raimondi/delimitMate/issues/197
Thanks!
--
A salesperson says: Translation:
"backward compatible" Old technology
"Premium" Overpriced
"Can't keep it on the shelf" Unavailable
"Stands alone" Piece of shit
"Proprietary" Incompatible
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.