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
c80be66c
Commit
c80be66c
authored
Mar 12, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Handle EM_FINDTEXT's unicode conversion in the host.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
93fec636
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
editor.c
dlls/riched20/editor.c
+1
-18
txthost.c
dlls/riched20/txthost.c
+16
-0
No files found.
dlls/riched20/editor.c
View file @
c80be66c
...
...
@@ -4167,24 +4167,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
{
return
editor
->
nTextLimit
;
}
case
EM_FINDTEXT
:
{
LRESULT
r
;
if
(
!
unicode
){
FINDTEXTA
*
ft
=
(
FINDTEXTA
*
)
lParam
;
int
nChars
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ft
->
lpstrText
,
-
1
,
NULL
,
0
);
WCHAR
*
tmp
;
if
((
tmp
=
heap_alloc
(
nChars
*
sizeof
(
*
tmp
)))
!=
NULL
)
MultiByteToWideChar
(
CP_ACP
,
0
,
ft
->
lpstrText
,
-
1
,
tmp
,
nChars
);
r
=
ME_FindText
(
editor
,
wParam
,
&
ft
->
chrg
,
tmp
,
NULL
);
heap_free
(
tmp
);
}
else
{
FINDTEXTW
*
ft
=
(
FINDTEXTW
*
)
lParam
;
r
=
ME_FindText
(
editor
,
wParam
,
&
ft
->
chrg
,
ft
->
lpstrText
,
NULL
);
}
return
r
;
}
case
EM_FINDTEXTEX
:
{
LRESULT
r
;
...
...
@@ -4203,6 +4185,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
return
r
;
}
case
EM_FINDTEXT
:
case
EM_FINDTEXTW
:
{
FINDTEXTW
*
ft
=
(
FINDTEXTW
*
)
lParam
;
...
...
dlls/riched20/txthost.c
View file @
c80be66c
...
...
@@ -834,6 +834,22 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
FillRect
(
hdc
,
&
rc
,
editor
->
hbrBackground
);
return
1
;
}
case
EM_FINDTEXT
:
{
FINDTEXTW
*
params
=
(
FINDTEXTW
*
)
lparam
;
FINDTEXTW
new_params
;
int
len
;
if
(
!
unicode
)
{
new_params
.
chrg
=
params
->
chrg
;
new_params
.
lpstrText
=
ME_ToUnicode
(
CP_ACP
,
(
char
*
)
params
->
lpstrText
,
&
len
);
params
=
&
new_params
;
}
hr
=
ITextServices_TxSendMessage
(
host
->
text_srv
,
EM_FINDTEXTW
,
wparam
,
(
LPARAM
)
params
,
&
res
);
if
(
!
unicode
)
ME_EndToUnicode
(
CP_ACP
,
(
WCHAR
*
)
new_params
.
lpstrText
);
break
;
}
case
WM_GETTEXT
:
{
GETTEXTEX
params
;
...
...
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