about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-12-07 18:45:30 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-12-07 18:45:30 +0000
commit9503eaee5a2b62786f33a7191a1666653c80ec0c (patch)
tree1247c46587fa94968d05ec758e3237a11fead283
parent2ac5a8cdcbe16d46845907393eb625cb3ec5f2f7 (diff)
downloadzsh-9503eaee5a2b62786f33a7191a1666653c80ec0c.tar.gz
zsh-9503eaee5a2b62786f33a7191a1666653c80ec0c.tar.xz
zsh-9503eaee5a2b62786f33a7191a1666653c80ec0c.zip
26116: didn't get updated properly for combining characters
-rw-r--r--Src/Zle/deltochar.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Src/Zle/deltochar.c b/Src/Zle/deltochar.c
index 941898387..74d15d4e0 100644
--- a/Src/Zle/deltochar.c
+++ b/Src/Zle/deltochar.c
@@ -44,11 +44,10 @@ deltochar(UNUSED(char **args))
     if (n > 0) {
 	while (n-- && dest != zlell) {
 	    while (dest != zlell && (ZLE_INT_T)zleline[dest] != c)
-		dest++;
+		INCPOS(dest);
 	    if (dest != zlell) {
-		/* HERE adjust dest for trailing combining chars */
 		if (!zap || n > 0)
-		    INCCS();
+		    INCPOS(dest);
 		if (!n) {
 		    forekill(dest - zlecs, CUT_RAW);
 		    ok++;
@@ -58,10 +57,10 @@ deltochar(UNUSED(char **args))
     } else {
 	/* ignore character cursor is on when scanning backwards */
 	if (dest)
-	    dest--;
+	    DECPOS(dest);
 	while (n++ && dest != 0) {
 	    while (dest != 0 && (ZLE_INT_T)zleline[dest] != c)
-		dest--;
+		DECPOS(dest);
 	    if ((ZLE_INT_T)zleline[dest] == c) {
 		if (!n) {
 		    /* HERE adjust zap for trailing combining chars */
@@ -69,7 +68,7 @@ deltochar(UNUSED(char **args))
 		    ok++;
 		}
 		if (dest)
-		    dest--;
+		    DECPOS(dest);
 	    }
 	}
     }