mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00: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
1 changed files with 12 additions and 0 deletions
|
@ -161,7 +161,9 @@ void ME_StrDeleteV(ME_String *s, int nVChar, int nChars)
|
||||||
static int
|
static int
|
||||||
ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
|
ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
|
||||||
{
|
{
|
||||||
|
#ifndef __REACTOS__
|
||||||
/* FIXME: Native also knows about punctuation */
|
/* FIXME: Native also knows about punctuation */
|
||||||
|
#endif
|
||||||
TRACE("s==%s, start==%d, len==%d, code==%d\n",
|
TRACE("s==%s, start==%d, len==%d, code==%d\n",
|
||||||
debugstr_wn(s, len), start, len, code);
|
debugstr_wn(s, len), start, len, code);
|
||||||
|
|
||||||
|
@ -173,13 +175,23 @@ ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
|
||||||
case WB_MOVEWORDLEFT:
|
case WB_MOVEWORDLEFT:
|
||||||
while (start && ME_IsWSpace(s[start - 1]))
|
while (start && ME_IsWSpace(s[start - 1]))
|
||||||
start--;
|
start--;
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
while (start && !ME_IsWSpace(s[start - 1]) && !iswpunct(s[start - 1]))
|
||||||
|
start--;
|
||||||
|
#else
|
||||||
while (start && !ME_IsWSpace(s[start - 1]))
|
while (start && !ME_IsWSpace(s[start - 1]))
|
||||||
start--;
|
start--;
|
||||||
|
#endif
|
||||||
return start;
|
return start;
|
||||||
case WB_RIGHT:
|
case WB_RIGHT:
|
||||||
case WB_MOVEWORDRIGHT:
|
case WB_MOVEWORDRIGHT:
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
while (start < len && !ME_IsWSpace(s[start]) && !iswpunct(s[start]))
|
||||||
|
start++;
|
||||||
|
#else
|
||||||
while (start < len && !ME_IsWSpace(s[start]))
|
while (start < len && !ME_IsWSpace(s[start]))
|
||||||
start++;
|
start++;
|
||||||
|
#endif
|
||||||
while (start < len && ME_IsWSpace(s[start]))
|
while (start < len && ME_IsWSpace(s[start]))
|
||||||
start++;
|
start++;
|
||||||
return start;
|
return start;
|
||||||
|
|
Loading…
Reference in a new issue