about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-04-17 12:52:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-04-17 12:52:13 +0000
commit72bd9ee6d92ef8521a7a4b4f2f658940906d5c4f (patch)
treec369e585b693247720fafb00adf8bdc3d871d92f /Src/utils.c
parent78ce07b49f08964eaa08d68eb8f6a5595bbcfbc6 (diff)
downloadzsh-72bd9ee6d92ef8521a7a4b4f2f658940906d5c4f.tar.gz
zsh-72bd9ee6d92ef8521a7a4b4f2f658940906d5c4f.tar.xz
zsh-72bd9ee6d92ef8521a7a4b4f2f658940906d5c4f.zip
24825: fix internal word-boundary widgets
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Src/utils.c b/Src/utils.c
index b4770befe..21a3a0c34 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3082,12 +3082,13 @@ wcsitype(wchar_t c, int itype)
 	    if (iswalnum(c))
 		return 1;
 	    /*
-	     * If we are handling combining characters, anything
-	     * printable with zero width needs to be considered
-	     * part of a word.
+	     * If we are handling combining characters, any punctuation
+	     * characters with zero width needs to be considered part of
+	     * a word.  If we are not handling combining characters then
+	     * logically they are still part of the word, even if they
+	     * don't get displayed properly, so always do this.
 	     */
-	    if (isset(COMBININGCHARS) &&
-		iswprint(c) && wcwidth(c) == 0)
+	    if (iswpunct(c) && wcwidth(c) == 0)
 		return 1;
 	    return !!wmemchr(wordchars_wide.chars, c, wordchars_wide.len);