The patch, I should have been in the attached file.
I have to use the two pointers.
I do not have the ability to write this test.
I study, but amateur.
I can see maybe grammar, thinking how to do well.
Anyway, I've got a patch that fixes my mistakes.
Does not seem to be an easy road in life.
--------
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/groups/opt_out.
diff -r bae71e70150b src/getchar.c
--- a/src/getchar.c Tue Feb 11 19:33:07 2014 +0100
+++ b/src/getchar.c Wed Feb 12 11:44:50 2014 +0900
@@ -2207,9 +2207,15 @@
/* Don't allow mapping the first byte(s) of a
* multi-byte char. Happens when mapping
* <M-a> and then changing 'encoding'. */
- if (has_mbyte && MB_BYTE2LEN(c1)
- > (*mb_ptr2len)(mp->m_keys))
- mlen = 0;
+ {
+ char_u *p1;
+ char_u *p2;
+ p1 = mp->m_keys;
+ p2 = mb_unescape(&p1);
+ if (has_mbyte && p2 != NULL &&
+ MB_BYTE2LEN(c1) > (*mb_ptr2len)(p2))
+ mlen = 0;
+ }
#endif
/*
* Check an entry whether it matches.