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
90342328
Commit
90342328
authored
Jun 25, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Jun 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added tests reveal a problem with EM_SETCHARFORMAT's affect on the undo stack.
parent
6d76d437
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
run.c
dlls/riched20/run.c
+1
-0
editor.c
dlls/riched20/tests/editor.c
+15
-0
No files found.
dlls/riched20/run.c
View file @
90342328
...
...
@@ -834,6 +834,7 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod)
ME_Style
*
style
;
ME_UndoItem
*
undo
;
/* FIXME: Should this be removed? It breaks a test. */
assert
(
mod
->
cbSize
==
sizeof
(
CHARFORMAT2W
));
undo
=
ME_AddUndoItem
(
editor
,
diUndoSetDefaultCharFormat
,
NULL
);
if
(
undo
)
{
...
...
dlls/riched20/tests/editor.c
View file @
90342328
...
...
@@ -569,6 +569,9 @@ static void test_EM_SETCHARFORMAT(void)
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
0xfffffff0
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_CANUNDO
,
0
,
0
);
ok
(
rc
==
FALSE
,
"Should not be able to undo here.
\n
"
);
SendMessage
(
hwndRichEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
/* A valid flag, CHARFORMAT2 structure minimally filled */
memset
(
&
cf2
,
0
,
sizeof
(
cf2
));
...
...
@@ -576,6 +579,9 @@ static void test_EM_SETCHARFORMAT(void)
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_DEFAULT
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_CANUNDO
,
0
,
0
);
todo_wine
ok
(
rc
==
FALSE
,
"Should not be able to undo here.
\n
"
);
SendMessage
(
hwndRichEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
/* A valid flag, CHARFORMAT2 structure minimally filled */
memset
(
&
cf2
,
0
,
sizeof
(
cf2
));
...
...
@@ -583,6 +589,9 @@ static void test_EM_SETCHARFORMAT(void)
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_SELECTION
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_CANUNDO
,
0
,
0
);
ok
(
rc
==
FALSE
,
"Should not be able to undo here.
\n
"
);
SendMessage
(
hwndRichEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
/* A valid flag, CHARFORMAT2 structure minimally filled */
memset
(
&
cf2
,
0
,
sizeof
(
cf2
));
...
...
@@ -590,6 +599,9 @@ static void test_EM_SETCHARFORMAT(void)
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_WORD
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_CANUNDO
,
0
,
0
);
todo_wine
ok
(
rc
==
TRUE
,
"Should not be able to undo here.
\n
"
);
SendMessage
(
hwndRichEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
/* A valid flag, CHARFORMAT2 structure minimally filled */
memset
(
&
cf2
,
0
,
sizeof
(
cf2
));
...
...
@@ -597,6 +609,9 @@ static void test_EM_SETCHARFORMAT(void)
rc
=
SendMessage
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
SCF_ALL
,
(
LPARAM
)
&
cf2
);
ok
(
rc
==
1
,
"EM_SETCHARFORMAT returned %d instead of 1
\n
"
,
rc
);
rc
=
SendMessage
(
hwndRichEdit
,
EM_CANUNDO
,
0
,
0
);
todo_wine
ok
(
rc
==
TRUE
,
"Should not be able to undo here.
\n
"
);
SendMessage
(
hwndRichEdit
,
EM_EMPTYUNDOBUFFER
,
0
,
0
);
cf2
.
cbSize
=
sizeof
(
CHARFORMAT2
);
SendMessage
(
hwndRichEdit
,
EM_GETCHARFORMAT
,
(
WPARAM
)
SCF_DEFAULT
,
...
...
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