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
087af502
Commit
087af502
authored
Feb 15, 2006
by
Thomas Kho
Committed by
Alexandre Julliard
Feb 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Extend EM_FINDTEXT conformance tests and fix 2 problems they expose.
parent
dd7e08cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
106 deletions
+140
-106
editor.c
dlls/riched20/editor.c
+13
-4
editor.c
dlls/riched20/tests/editor.c
+127
-102
No files found.
dlls/riched20/editor.c
View file @
087af502
...
...
@@ -789,11 +789,11 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CH
nMax
=
max
(
chrg
->
cpMin
,
chrg
->
cpMax
);
}
if
(
!
nLen
)
if
(
!
nLen
||
nMin
<
0
||
nMax
<
0
)
{
if
(
chrgText
)
chrgText
->
cpMin
=
chrgText
->
cpMax
=
((
flags
&
FR_DOWN
)
?
nMin
:
nMax
)
;
return
chrgText
->
cpMin
;
chrgText
->
cpMin
=
chrgText
->
cpMax
=
-
1
;
return
-
1
;
}
if
(
flags
&
FR_DOWN
)
/* Forward search */
...
...
@@ -801,7 +801,11 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CH
nStart
=
nMin
;
item
=
ME_FindItemAtOffset
(
editor
,
diRun
,
nStart
,
&
nStart
);
if
(
!
item
)
{
if
(
chrgText
)
chrgText
->
cpMin
=
chrgText
->
cpMax
=
-
1
;
return
-
1
;
}
para
=
ME_GetParagraph
(
item
);
while
(
item
...
...
@@ -845,8 +849,11 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CH
{
nEnd
=
nMax
;
item
=
ME_FindItemAtOffset
(
editor
,
diRun
,
nEnd
,
&
nEnd
);
if
(
!
item
)
if
(
!
item
)
{
if
(
chrgText
)
chrgText
->
cpMin
=
chrgText
->
cpMax
=
-
1
;
return
-
1
;
}
para
=
ME_GetParagraph
(
item
);
...
...
@@ -888,6 +895,8 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, WCHAR *text, CH
}
}
TRACE
(
"not found
\n
"
);
if
(
chrgText
)
chrgText
->
cpMin
=
chrgText
->
cpMax
=
-
1
;
return
-
1
;
}
...
...
dlls/riched20/tests/editor.c
View file @
087af502
This diff is collapsed.
Click to expand it.
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