OK, below is a patch to convert 0xCE as K_NUL+3. This is converting all K_NUL to K_NUL+3 in typeahead because typeahead may be converted with iconv.
https://gist.github.com/mattn/6f66c3f8186369cabd90 diff -r bed71c37618c src/getchar.c --- a/src/getchar.c Thu May 29 14:36:29 2014 +0200 +++ b/src/getchar.c Fri Jun 06 22:51:58 2014 +0900 @@ -1699,7 +1699,7 @@ c = CSI; #endif } -#ifdef MSDOS +#if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI)) /* * If K_NUL was typed, it is replaced by K_NUL, 3 in mch_inchar(). * Delete the 3 here. diff -r bed71c37618c src/os_win32.c --- a/src/os_win32.c Thu May 29 14:36:29 2014 +0200 +++ b/src/os_win32.c Fri Jun 06 22:51:58 2014 +0900 @@ -1805,6 +1805,21 @@ n + unconverted, TYPEAHEADLEN - typeaheadlen, rest == NULL ? &rest : NULL, &restlen); } + + /* Convert K_NUL in input characters. */ + { + char_u *p = typeahead + typeaheadlen; + char_u *e = typeahead + TYPEAHEADLEN; + while (*p && p < e) { + if (*p == K_NUL) { + p++; + mch_memmove(p, p + 1, 1); + *p = 3; + n++; + } + p++; + } + } #endif /* Use the ALT key to set the 8th bit of the character - Yasuhiro Matsumoto -- -- 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.
