If I do not get me wrong, it is a way of also solved this patch.
":imap a ボ" also work normally.

This patch is with the cooperation of vim-jp community.

--------
Thanks.
Nobuhiro Takasaki

-- 
-- 
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.
diff -r 4aa63564dd3f src/os_win32.c
--- a/src/os_win32.c	Wed Jun 18 21:38:18 2014 +0200
+++ b/src/os_win32.c	Thu Jun 19 13:01:15 2014 +0900
@@ -1785,13 +1785,14 @@
 #endif
 	    {
 		int	n = 1;
-
-		/* A key may have one or two bytes. */
+                int     conv = FALSE;
+
 		typeahead[typeaheadlen] = c;
 		if (ch2 != NUL)
 		{
-		    typeahead[typeaheadlen + 1] = ch2;
-		    ++n;
+                    typeahead[typeaheadlen + 1] = 3;
+		    typeahead[typeaheadlen + 2] = ch2;
+                    n += 2;
 		}
 #ifdef FEAT_MBYTE
 		/* Only convert normal characters, not special keys.  Need to
@@ -1800,6 +1801,7 @@
 		if (input_conv.vc_type != CONV_NONE
 						&& (ch2 == NUL || c != K_NUL))
 		{
+                    conv = TRUE;
 		    typeaheadlen -= unconverted;
 		    n = convert_input_safe(typeahead + typeaheadlen,
 				n + unconverted, TYPEAHEADLEN - typeaheadlen,
@@ -1807,6 +1809,23 @@
 		}
 #endif
 
+                if (conv)
+                {
+                    char_u *p = typeahead + typeaheadlen;
+                    char_u *e = typeahead + TYPEAHEADLEN;
+                    while (*p && p < e)
+                    {
+                        if (*p == K_NUL)
+                        {
+                            ++p;
+                            mch_memmove(p + 1, p, ((size_t)(e - p)) - 1);
+                            *p = 3;
+                            ++n;
+                        }
+                        ++p;
+                    }
+                }
+
 		/* Use the ALT key to set the 8th bit of the character
 		 * when it's one byte, the 8th bit isn't set yet and not
 		 * using a double-byte encoding (would become a lead
diff -r 4aa63564dd3f src/term.c
--- a/src/term.c	Wed Jun 18 21:38:18 2014 +0200
+++ b/src/term.c	Thu Jun 19 13:01:15 2014 +0900
@@ -3711,7 +3711,11 @@
 	return;
     }
 
+#if defined(WIN3264) && !defined(FEAT_GUI)
+    s = vim_strnsave(string, (int)STRLEN(string) + 1);
+#else
     s = vim_strsave(string);
+#endif
     if (s == NULL)
 	return;
 
@@ -3721,6 +3725,15 @@
 	STRMOVE(s, s + 1);
 	s[0] = term_7to8bit(string);
     }
+
+#if defined(WIN3264) && !defined(FEAT_GUI)
+    if (s[0] == K_NUL)
+    {
+        STRMOVE(s + 1, s);
+        s[1] = 3;
+    }
+#endif
+
     len = (int)STRLEN(s);
 
     need_gather = TRUE;		/* need to fill termleader[] */

Raspunde prin e-mail lui