Re: Multi-byte in the special key

2007-04-19 Thread Bram Moolenaar

Volodia Vichniakov wrote:

 It's my first mail to this list.
 
 I'm using vim on Win32 this Russian keyboard. There are some bugs with
 mapping of russians special keys. I've made some patches to fix these
 bugs.
 
 Let start step by step.
 1. Special key may contain multi-byte character (ex. unicode) after
 modifier. For example, if I press a key Alt-k with russian input
 (Alt-Ì) then vim's got key K_SPECIAL K_SPECIAL 0x08 0xd0 0xbb, where
 0xd0 0xbb is the unicode character CYRILLIC_SMALL_LETTER_EL.
 2. In functions find_special_key (misc2.c) and str2special (message.c)
 vim supposes that there is only _1_ byte after modifiers.
 
 I can offer the corrected code for these functions.
 
 (There are 2 other patches to fix this problem in the console Win32
 application)

It will help us a lot if you provide a reproducable example.  I don't
have a Russian keyboard, thus hopefully this won't be required.

You can send patches directly to me.  If they are small you can also
send them to the vim-dev list, so that others can make comments.

-- 
The acknowledged parents of reengineering are Michael Hammer and James Champy.
When I say they're the parents I don't mean they had sex - and I apologize
for making you think about it.  I mean they wrote the best-selling business
book _Reengineering the Corporation_, which was published in 1993.
   Businesses flocked to reengineering like frat boys to a drunken
cheerleader.  (This analogy wasn't necessary, but I'm trying to get my mind
off that Hammer and Champy thing.)
(Scott Adams - The Dilbert principle)

 /// 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///


Multi-byte in the special key

2007-04-12 Thread Volodia Vichniakov
Hi!
It's my first mail to this list.

I'm using vim on Win32 this Russian keyboard. There are some bugs with mapping 
of russians special keys. I've made some patches to fix these bugs.

Let start step by step.
1. Special key may contain multi-byte character (ex. unicode) after  modifier. 
For example, if I press a key Alt-k with russian input (Alt-л) then vim's got 
key K_SPECIAL K_SPECIAL 0x08 0xd0 0xbb, where 0xd0 0xbb is the unicode 
character CYRILLIC_SMALL_LETTER_EL.
2. In functions find_special_key (misc2.c) and str2special (message.c) vim 
supposes that there is only _1_ byte after modifiers.

I can offer the corrected code for these functions.

(There are 2 other patches to fix this problem in the console Win32 application)