From 1424e923b1676b04249d1a853f4360b8956fe9e9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 4 May 2008 18:30:02 +0000 Subject: 24915: some more fix-ups for combining characters --- Src/Zle/zle_misc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Src/Zle/zle_misc.c') diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 8379b2333..a6f7e803b 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -801,10 +801,20 @@ copyprevword(UNUSED(char **args)) for (;;) { t1 = t0; - while (t0 && !ZC_iword(zleline[t0-1])) - t0--; - while (t0 && ZC_iword(zleline[t0-1])) - t0--; + while (t0) { + int prev = t0; + DECPOS(prev); + if (ZC_iword(zleline[prev])) + break; + t0 = prev; + } + while (t0) { + int prev = t0; + DECPOS(prev); + if (!ZC_iword(zleline[prev])) + break; + t0 = prev; + } if (!--count) break; -- cgit 1.4.1