mirror of
https://github.com/reactos/reactos.git
synced 2024-12-05 09:23:32 +08:00
[RICHED20] Fix word break procedure for punct (#5021)
Fix the hyperlink on Chinese Rapps. Check punctuation in the word break procedure by using iswpunct function. Wine Bug: https://bugs.winehq.org/show_bug.cgi?id=54419 CORE-17091
This commit is contained in:
parent
ea55101aad
commit
64527aa948
@ -161,7 +161,9 @@ void ME_StrDeleteV(ME_String *s, int nVChar, int nChars)
|
||||
static int
|
||||
ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
|
||||
{
|
||||
#ifndef __REACTOS__
|
||||
/* FIXME: Native also knows about punctuation */
|
||||
#endif
|
||||
TRACE("s==%s, start==%d, len==%d, code==%d\n",
|
||||
debugstr_wn(s, len), start, len, code);
|
||||
|
||||
@ -173,13 +175,23 @@ ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
|
||||
case WB_MOVEWORDLEFT:
|
||||
while (start && ME_IsWSpace(s[start - 1]))
|
||||
start--;
|
||||
#ifdef __REACTOS__
|
||||
while (start && !ME_IsWSpace(s[start - 1]) && !iswpunct(s[start - 1]))
|
||||
start--;
|
||||
#else
|
||||
while (start && !ME_IsWSpace(s[start - 1]))
|
||||
start--;
|
||||
#endif
|
||||
return start;
|
||||
case WB_RIGHT:
|
||||
case WB_MOVEWORDRIGHT:
|
||||
#ifdef __REACTOS__
|
||||
while (start < len && !ME_IsWSpace(s[start]) && !iswpunct(s[start]))
|
||||
start++;
|
||||
#else
|
||||
while (start < len && !ME_IsWSpace(s[start]))
|
||||
start++;
|
||||
#endif
|
||||
while (start < len && ME_IsWSpace(s[start]))
|
||||
start++;
|
||||
return start;
|
||||
|
Loading…
Reference in New Issue
Block a user