Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9210defd
Commit
9210defd
authored
Sep 06, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Sep 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Do not pass NULL lParam to ME_ToUnicode for EM_REPLACESEL.
parent
6444f574
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
editor.c
dlls/riched20/editor.c
+2
-2
editor.c
dlls/riched20/tests/editor.c
+22
-0
No files found.
dlls/riched20/editor.c
View file @
9210defd
...
...
@@ -1822,8 +1822,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
{
int
from
,
to
;
ME_Style
*
style
;
LPWSTR
wszText
=
ME_ToUnicode
(
unicode
,
(
void
*
)
lParam
)
;
size_t
len
=
lstrlenW
(
wszText
)
;
LPWSTR
wszText
=
lParam
?
ME_ToUnicode
(
unicode
,
(
void
*
)
lParam
)
:
NULL
;
size_t
len
=
wszText
?
lstrlenW
(
wszText
)
:
0
;
TRACE
(
"EM_REPLACESEL - %s
\n
"
,
debugstr_w
(
wszText
));
ME_GetSelection
(
editor
,
&
from
,
&
to
);
...
...
dlls/riched20/tests/editor.c
View file @
9210defd
...
...
@@ -1456,6 +1456,27 @@ static void test_EM_EXSETSEL(void)
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_EM_REPLACESEL
(
void
)
{
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
char
buffer
[
1024
]
=
{
0
};
int
r
;
/* sending some text to the window */
SendMessage
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"testing selection"
);
/* 01234567890123456*/
/* 10 */
/* FIXME add more tests */
SendMessage
(
hwndRichEdit
,
EM_SETSEL
,
7
,
17
);
SendMessage
(
hwndRichEdit
,
EM_REPLACESEL
,
0
,
(
LPARAM
)
NULL
);
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
r
=
strcmp
(
buffer
,
"testing"
);
ok
(
0
==
r
,
"expected %d, got %d
\n
"
,
0
,
r
);
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_WM_PASTE
(
void
)
{
int
result
;
...
...
@@ -1922,6 +1943,7 @@ START_TEST( editor )
test_EM_FORMATRANGE
();
test_unicode_conversions
();
test_EM_GETTEXTLENGTHEX
();
test_EM_REPLACESEL
();
/* Set the environment variable WINETEST_RICHED20 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
...
...
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