diff --git a/src/getchar.c b/src/getchar.c
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -4616,9 +4616,21 @@
}
else
{
+#ifdef FEAT_MBYTE
+ int len = mb_char2len(PTR2CHAR(s));
+ int len2 = mb_ptr2len(s);
+#endif
/* Add character, possibly multi-byte to destination, escaping
* CSI and K_SPECIAL. */
d = add_char2buf(PTR2CHAR(s), d);
+#ifdef FEAT_MBYTE
+ while (len < len2)
+ {
+ /* add following combining char */
+ d = add_char2buf(PTR2CHAR(s+len), d);
+ len += mb_char2len(PTR2CHAR(s+len));
+ }
+#endif
mb_ptr_adv(s);
}
}
diff --git a/src/testdir/test44.in b/src/testdir/test44.in
--- a/src/testdir/test44.in
+++ b/src/testdir/test44.in
@@ -32,7 +32,9 @@
x:" Test backwards search from a multi-byte char
/x
x?.
-x:?^1?,$w! test.out
+x:let @w=':%s#comb[i]nations#Å"Ì„á¹£Ì#g'
+:@w
+:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"××'×'×"\", \".\", 0, 2) " ×'
:put =matchstr(\"××'×'×"\", \"..\", 0, 2) " ×'×'
@@ -61,3 +63,4 @@
h AÃÃÂÃÄÅÄÄ‚Ä„ÇÇÇ áº¢ BḂḆ CÇĆÄÄŠÄŒ DÄÄḊá¸á¸ EÃÉÊÃ&lsqauo;Ä'Ä"ĖĘĚẺẼ FḠGÄœÄÄ Ä¢Ç¤Ç¦Ç´á¸ HĤĦḢḦḨ IÃŒÃÃÃĨĪĬĮİÇá» JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṠNÃ'ŃŅŇṄṠOÃ'Ã"Ã"ÕÖØŌÅÅÆ Ç'ǪǬỠPá¹"á¹– Q RÅ"ŖŘṘṠSŚŜÅÅ á¹ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯÇ"Ủ Vá¹¼ WÅ´áºáº‚ẄẆ XẊẌ YÃŶŸáºá»²á»¶á»¸ ZŹŻŽƵáºáº"
i aà áâãäåÄăąÇǟǡả bḃḇ cçćĉÄ&lsqauo;Ä dÄÄ'á¸&lsqauo;á¸á¸' eèéêëÄ"ĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìÃîïĩīÄįÇỉ jĵǰ kķǩḱḵ lĺļľÅłḻ mḿṠnñńņÅʼnṅṉ oòóôõöøÅÅÅ'Æ¡Ç'Ç«Çá» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūÅůűųưÇ"ủ vá¹½ wŵáºáºƒáº…ẇẘ xáº&lsqauo;Ạyýÿŷáºáº™á»³á»·á»¹ zźżžƶáº'ẕ
j 0123â¤x
+k combinations
diff --git a/src/testdir/test44.ok b/src/testdir/test44.ok
--- a/src/testdir/test44.ok
+++ b/src/testdir/test44.ok
@@ -17,6 +17,7 @@
h AÃÃÂÃÄÅÄÄ‚Ä„ÇÇÇ áº¢ BḂḆ CÇĆÄÄŠÄŒ DÄÄḊá¸á¸ EÃÉÊÃ&lsqauo;Ä'Ä"ĖĘĚẺẼ FḠGÄœÄÄ Ä¢Ç¤Ç¦Ç´á¸ HĤĦḢḦḨ IÃŒÃÃÃĨĪĬĮİÇá» JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṠNÃ'ŃŅŇṄṠOÃ'Ã"Ã"ÕÖØŌÅÅÆ Ç'ǪǬỠPá¹"á¹– Q RÅ"ŖŘṘṠSŚŜÅÅ á¹ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯÇ"Ủ Vá¹¼ WÅ´áºáº‚ẄẆ XẊẌ YÃŶŸáºá»²á»¶á»¸ ZŹŻŽƵáº
i aà áâãäåÄăąÇǟǡả bḃḇ cçćĉÄ&lsqauo;Ä dÄÄ'á¸&lsqauo;á¸á¸' eèéêëÄ"ĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìÃîïĩīÄįÇỉ jĵǰ kķǩḱḵ lĺļľÅłḻ mḿṠnñńņÅʼnṅṉ oòóôõöøÅÅÅ'Æ¡Ç'Ç«Çá» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūÅůűųưÇ"ủ vá¹½ wŵáºáºƒáº…ẇẘ xáº&lsqauo;Ạyýÿŷáºáº™á»³á»·á»¹ zźżžƶáº'
j 012â¤
+k Å"Ì„á¹£Ì
×'
×'×'
×
Hi William!
On So, 07 Apr 2013, William Fugh wrote:
> BTW: Here is a patch.
> >
> > Well done, thank you guys so much. :-)
Actually, it is not quite right. I forgot, there could be several
combining chars. So here is an updated patch. Bram, please check.
regards,
Christian
--
Nett sein kann jeder - meckern ist wichtig!
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sunday, April 7, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment