Matt Wozniski wrote:

> At :help :set-termcap, an example shows the command
> 
> :set <M-b>=^[b
> 
> This command does not work as expected when 'encoding' is set to
> something multibyte.  The reason seems to be that vim recognizes the
> input bytes 0x1B 0x62 as a metafied 'b', and then stuffs 0xE2 into its
> internal text buffers - a byte which is not reasonable unicode.  As a
> result, vim continues waiting for more bytes to finish the
> (unintentional) sequence, until it gives up, decides that the sequence
> is invalid multibyte, and just returns the first byte as a character.
> The attached patch fixes this by stuffing the multibyte bytes
> corresponding to the given codepoint into the input buffer instead.
> I'm not sure if there's a better way to handle changing the size of
> MAX_KEY_CODE_LEN in src/keymap.h, but Bram will know for sure.

Thanks for the patch.  This stuff is a bit complicated, it does looks
like your solution is the right one.

-- 
Why isn't there mouse-flavored cat food?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui