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
3f1d3e0e
Commit
3f1d3e0e
authored
May 24, 2010
by
Dylan Smith
Committed by
Alexandre Julliard
May 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Simplify redundant code in WM_IME_COMPOSITION.
parent
e809bc88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
editor.c
dlls/riched20/editor.c
+9
-17
No files found.
dlls/riched20/editor.c
View file @
3f1d3e0e
...
...
@@ -4257,32 +4257,24 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
hIMC
=
ITextHost_TxImmGetContext
(
editor
->
texthost
);
ME_DeleteSelection
(
editor
);
ME_SaveTempStyle
(
editor
);
if
(
lParam
&
GCS_RESULTSTR
)
if
(
lParam
&
(
GCS_RESULTSTR
|
GCS_COMPSTR
)
)
{
LPWSTR
lpCompStr
=
NULL
;
DWORD
dwBufLen
;
DWORD
dwIndex
=
lParam
&
GCS_RESULTSTR
;
if
(
!
dwIndex
)
dwIndex
=
GCS_COMPSTR
;
dwBufLen
=
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
NULL
,
0
);
dwBufLen
=
ImmGetCompositionStringW
(
hIMC
,
dwIndex
,
NULL
,
0
);
lpCompStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufLen
+
sizeof
(
WCHAR
));
ImmGetCompositionStringW
(
hIMC
,
GCS_RESULTSTR
,
lpCompStr
,
dwBufLen
);
ImmGetCompositionStringW
(
hIMC
,
dwIndex
,
lpCompStr
,
dwBufLen
);
lpCompStr
[
dwBufLen
/
sizeof
(
WCHAR
)]
=
0
;
ME_InsertTextFromCursor
(
editor
,
0
,
lpCompStr
,
dwBufLen
/
sizeof
(
WCHAR
),
style
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCompStr
);
}
else
if
(
lParam
&
GCS_COMPSTR
)
{
LPWSTR
lpCompStr
=
NULL
;
DWORD
dwBufLen
;
dwBufLen
=
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
NULL
,
0
);
lpCompStr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufLen
+
sizeof
(
WCHAR
));
ImmGetCompositionStringW
(
hIMC
,
GCS_COMPSTR
,
lpCompStr
,
dwBufLen
);
lpCompStr
[
dwBufLen
/
sizeof
(
WCHAR
)]
=
0
;
ME_InsertTextFromCursor
(
editor
,
0
,
lpCompStr
,
dwBufLen
/
sizeof
(
WCHAR
),
style
);
HeapFree
(
GetProcessHeap
(),
0
,
lpCompStr
);
ME_SetSelection
(
editor
,
editor
->
imeStartIndex
,
editor
->
imeStartIndex
+
dwBufLen
/
sizeof
(
WCHAR
));
if
(
dwIndex
==
GCS_COMPSTR
)
ME_SetSelection
(
editor
,
editor
->
imeStartIndex
,
editor
->
imeStartIndex
+
dwBufLen
/
sizeof
(
WCHAR
));
}
ME_ReleaseStyle
(
style
);
ME_CommitUndo
(
editor
);
...
...
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