Hi William!

On Fr, 05 Apr 2013, William Fugh wrote:

> It's OK if execute the following in command-line directly
> :%s#combinations#œ̄ṣ́#g
> 
> However, if like this:
> :let @w = "%s#combinations#œ̄ṣ́#g"
> :@w
> the combinations will be lost. :-(

It's a combining char ;)

BTW: Here is a patch.

regards,
Christian
-- 

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


diff --git a/src/getchar.c b/src/getchar.c
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -4616,9 +4616,18 @@
 	    }
 	    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
+		if (len < len2)
+		    /* add following composing char */
+		    d = add_char2buf(PTR2CHAR(s+len), d);
+#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ÈÉÊËĒĔĖĘĚẺẼ 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çćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ 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ÈÉÊËĒĔĖĘĚẺẼ 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çćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ
 j 012❤
+k œ̄ṣ́
 ב
 בג
 א

Reply via email to