Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f945f16d
Commit
f945f16d
authored
Dec 06, 2007
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Dec 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: WM_GETTEXTLENGTH should include CRLF conversions in returned count.
parent
3b636b58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
editor.c
dlls/riched20/editor.c
+7
-1
editor.c
dlls/riched20/tests/editor.c
+12
-0
No files found.
dlls/riched20/editor.c
View file @
f945f16d
...
...
@@ -1996,7 +1996,13 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
return
0
;
}
case
WM_GETTEXTLENGTH
:
return
ME_GetTextLength
(
editor
);
{
GETTEXTLENGTHEX
how
;
how
.
flags
=
GTL_CLOSE
|
GTL_USECRLF
|
GTL_NUMCHARS
;
how
.
codepage
=
unicode
?
1200
:
CP_ACP
;
return
ME_GetTextLengthEx
(
editor
,
&
how
);
}
case
EM_GETTEXTLENGTHEX
:
return
ME_GetTextLengthEx
(
editor
,
(
GETTEXTLENGTHEX
*
)
wParam
);
case
WM_GETTEXT
:
...
...
dlls/riched20/tests/editor.c
View file @
f945f16d
...
...
@@ -671,6 +671,12 @@ static void test_WM_GETTEXT(void)
ok
(
result
==
0
,
"WM_GETTEXT: settext and gettext differ. strcmp: %d
\n
"
,
result
);
/* Test for returned value of WM_GETTEXTLENGTH */
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
);
ok
(
result
==
strlen
(
text
),
"WM_GETTEXTLENGTH reports incorrect length %d, expected %d
\n
"
,
result
,
strlen
(
text
));
/* Test for behavior in overflow case */
memset
(
buffer
,
0
,
1024
);
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
strlen
(
text
),
(
LPARAM
)
buffer
);
...
...
@@ -689,6 +695,12 @@ static void test_WM_GETTEXT(void)
ok
(
result
==
0
,
"WM_GETTEXT: settext and gettext differ. strcmp: %d
\n
"
,
result
);
/* Test for returned value of WM_GETTEXTLENGTH */
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
);
ok
(
result
==
strlen
(
text2_after
),
"WM_GETTEXTLENGTH reports incorrect length %d, expected %d
\n
"
,
result
,
strlen
(
text2_after
));
/* Test for behavior of CRLF conversion in case of overflow */
memset
(
buffer
,
0
,
1024
);
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
strlen
(
text2
),
(
LPARAM
)
buffer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment