Index: src/term.c
===================================================================
--- src/term.c	(revision 1318)
+++ src/term.c	(working copy)
@@ -5155,28 +5155,33 @@
 	for (i = (*mb_ptr2len)(src); i > 0; --i)
 #endif
 	{
-	    /*
-	     * If the character is K_SPECIAL, replace it with K_SPECIAL
-	     * KS_SPECIAL KE_FILLER.
-	     * If compiled with the GUI replace CSI with K_CSI.
-	     */
-	    if (*src == K_SPECIAL)
-	    {
-		result[dlen++] = K_SPECIAL;
-		result[dlen++] = KS_SPECIAL;
-		result[dlen++] = KE_FILLER;
-	    }
+	    if (i == 1) {
+		/*
+		 * If the character is K_SPECIAL, replace it with K_SPECIAL
+		 * KS_SPECIAL KE_FILLER.
+		 * If compiled with the GUI replace CSI with K_CSI.
+		 */
+		if (*src == K_SPECIAL)
+		{
+		    result[dlen++] = K_SPECIAL;
+		    result[dlen++] = KS_SPECIAL;
+		    result[dlen++] = KE_FILLER;
+		}
 # ifdef FEAT_GUI
-	    else if (*src == CSI)
-	    {
-		result[dlen++] = K_SPECIAL;
-		result[dlen++] = KS_EXTRA;
-		result[dlen++] = (int)KE_CSI;
+		else if (*src == CSI)
+		{
+		    result[dlen++] = K_SPECIAL;
+		    result[dlen++] = KS_EXTRA;
+		    result[dlen++] = (int)KE_CSI;
+		} else
+		    result[dlen++] = *src;
+# endif
+		++src;
+	    } else {
+		mch_memmove(result + dlen, src, i);
+		dlen += i;
+		src += i;
 	    }
-# endif
-	    else
-		result[dlen++] = *src;
-	    ++src;
 	}
     }
     result[dlen] = NUL;
