changeset 4356:d67e292af6f9 v7.3.927

updated for version 7.3.927 Problem: Missing combining characters when putting text in a register. Solution: Include combining characters. (David B?rgin)
author Bram Moolenaar <bram@vim.org>
date Mon, 06 May 2013 05:50:28 +0200
parents 504b928f9a1c
children 2f4dad5dab9f
files src/getchar.c src/testdir/test44.in src/testdir/test44.ok src/version.c
diffstat 4 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -4616,9 +4616,21 @@ vim_strsave_escape_csi(p)
 	    }
 	    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);
 	    }
 	}
--- a/src/testdir/test44.in
+++ b/src/testdir/test44.in
@@ -32,7 +32,9 @@ x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [
 x:" Test backwards search from a multi-byte char
 /x
 x?.
-x:?^1?,$w! test.out
+x:let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g'
+:@w
+:?^1?,$w! test.out
 :e! test.out
 G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב
 :put =matchstr(\"אבגד\", \"..\", 0, 2) " בג
@@ -61,3 +63,4 @@ g a啷bb
 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
--- a/src/testdir/test44.ok
+++ b/src/testdir/test44.ok
@@ -17,6 +17,7 @@ g abb
 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 œ̄ṣ́m̥̄ᾱ̆́
 ב
 בג
 א
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    927,
+/**/
     926,
 /**/
     925,