From 72bd9ee6d92ef8521a7a4b4f2f658940906d5c4f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 17 Apr 2008 12:52:13 +0000 Subject: 24825: fix internal word-boundary widgets --- Src/utils.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Src/utils.c') 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); -- cgit v1.2.3