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
c0c36fba
Commit
c0c36fba
authored
Mar 30, 2015
by
Christoph von Wittich
Committed by
Alexandre Julliard
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: EM_SETSEL should not return 0.
parent
ccea6c60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
editor.c
dlls/riched20/editor.c
+1
-2
editor.c
dlls/riched20/tests/editor.c
+38
-0
No files found.
dlls/riched20/editor.c
View file @
c0c36fba
...
...
@@ -3308,8 +3308,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
EM_SETSEL
:
{
handle_EM_EXSETSEL
(
editor
,
wParam
,
lParam
);
return
0
;
return
handle_EM_EXSETSEL
(
editor
,
wParam
,
lParam
);
}
case
EM_SETSCROLLPOS
:
{
...
...
dlls/riched20/tests/editor.c
View file @
c0c36fba
...
...
@@ -4454,6 +4454,43 @@ static void test_EM_EXSETSEL(void)
DestroyWindow
(
hwndRichEdit
);
}
static
void
check_EM_SETSEL
(
HWND
hwnd
,
const
struct
exsetsel_s
*
setsel
,
int
id
)
{
LRESULT
result
;
int
start
,
end
;
result
=
SendMessageA
(
hwnd
,
EM_SETSEL
,
setsel
->
min
,
setsel
->
max
);
ok
(
result
==
setsel
->
expected_retval
,
"EM_SETSEL(%d): expected: %ld actual: %ld
\n
"
,
id
,
setsel
->
expected_retval
,
result
);
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
start
,
(
LPARAM
)
&
end
);
if
(
setsel
->
_getsel_todo_wine
)
{
todo_wine
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_SETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
}
else
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_SETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
}
static
void
test_EM_SETSEL
(
void
)
{
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
int
i
;
const
int
num_tests
=
sizeof
(
exsetsel_tests
)
/
sizeof
(
struct
exsetsel_s
);
/* sending some text to the window */
SendMessageA
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"testing selection"
);
/* 01234567890123456*/
/* 10 */
for
(
i
=
0
;
i
<
num_tests
;
i
++
)
{
check_EM_SETSEL
(
hwndRichEdit
,
&
exsetsel_tests
[
i
],
i
);
}
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_EM_REPLACESEL
(
int
redraw
)
{
HWND
hwndRichEdit
=
new_richedit
(
NULL
);
...
...
@@ -7658,6 +7695,7 @@ START_TEST( editor )
test_EM_GETLIMITTEXT
();
test_WM_SETFONT
();
test_EM_GETMODIFY
();
test_EM_SETSEL
();
test_EM_EXSETSEL
();
test_WM_PASTE
();
test_EM_STREAMIN
();
...
...
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