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
e5f5dc60
Commit
e5f5dc60
authored
Dec 16, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Dec 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Removed some unnecessary SendMessage calls to itself.
parent
c7c2ff1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
caret.c
dlls/riched20/caret.c
+1
-3
editor.c
dlls/riched20/editor.c
+8
-3
No files found.
dlls/riched20/caret.c
View file @
e5f5dc60
...
@@ -1566,10 +1566,8 @@ void ME_SendSelChange(ME_TextEditor *editor)
...
@@ -1566,10 +1566,8 @@ void ME_SendSelChange(ME_TextEditor *editor)
if
(
!
(
editor
->
nEventMask
&
ENM_SELCHANGE
))
if
(
!
(
editor
->
nEventMask
&
ENM_SELCHANGE
))
return
;
return
;
sc
.
nmhdr
.
hwndFrom
=
editor
->
hWnd
;
sc
.
nmhdr
.
idFrom
=
GetWindowLongW
(
editor
->
hWnd
,
GWLP_ID
);
sc
.
nmhdr
.
code
=
EN_SELCHANGE
;
sc
.
nmhdr
.
code
=
EN_SELCHANGE
;
SendMessageW
(
editor
->
hWnd
,
EM_EXGETSEL
,
0
,
(
LPARAM
)
&
sc
.
chrg
);
ME_GetSelection
(
editor
,
&
sc
.
chrg
.
cpMin
,
&
sc
.
chrg
.
cpMax
);
sc
.
seltyp
=
SEL_EMPTY
;
sc
.
seltyp
=
SEL_EMPTY
;
if
(
sc
.
chrg
.
cpMin
!=
sc
.
chrg
.
cpMax
)
if
(
sc
.
chrg
.
cpMin
!=
sc
.
chrg
.
cpMax
)
sc
.
seltyp
|=
SEL_TEXT
;
sc
.
seltyp
|=
SEL_TEXT
;
...
...
dlls/riched20/editor.c
View file @
e5f5dc60
...
@@ -1426,7 +1426,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
...
@@ -1426,7 +1426,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_DisplayItem
*
para_item
;
ME_DisplayItem
*
para_item
;
style
=
editor
->
pBuffer
->
pDefaultStyle
;
style
=
editor
->
pBuffer
->
pDefaultStyle
;
ME_AddRefStyle
(
style
);
ME_AddRefStyle
(
style
);
SendMessageA
(
editor
->
hWnd
,
EM_SETSEL
,
0
,
0
);
ME_SetSelection
(
editor
,
0
,
0
);
ME_InternalDeleteText
(
editor
,
0
,
ME_GetTextLength
(
editor
),
FALSE
);
ME_InternalDeleteText
(
editor
,
0
,
ME_GetTextLength
(
editor
),
FALSE
);
from
=
to
=
0
;
from
=
to
=
0
;
ME_ClearTempStyle
(
editor
);
ME_ClearTempStyle
(
editor
);
...
@@ -1559,7 +1559,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
...
@@ -1559,7 +1559,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_GetSelection
(
editor
,
&
to
,
&
to2
);
ME_GetSelection
(
editor
,
&
to
,
&
to2
);
/* put the cursor at the top */
/* put the cursor at the top */
if
(
!
(
format
&
SFF_SELECTION
))
if
(
!
(
format
&
SFF_SELECTION
))
SendMessageA
(
editor
->
hWnd
,
EM_SETSEL
,
0
,
0
);
ME_SetSelection
(
editor
,
0
,
0
);
}
}
/* Restore saved undo mode */
/* Restore saved undo mode */
...
@@ -4063,7 +4063,12 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -4063,7 +4063,12 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
LRESULT
ret
;
LRESULT
ret
;
int
mask
=
0
;
int
mask
=
0
;
int
changes
=
0
;
int
changes
=
0
;
ret
=
RichEditWndProc_common
(
hWnd
,
WM_GETTEXTLENGTH
,
0
,
0
,
unicode
);
GETTEXTLENGTHEX
how
;
/* CR/LF conversion required in 2.0 mode, verbatim in 1.0 mode */
how
.
flags
=
GTL_CLOSE
|
(
editor
->
bEmulateVersion10
?
0
:
GTL_USECRLF
)
|
GTL_NUMCHARS
;
how
.
codepage
=
unicode
?
1200
:
CP_ACP
;
ret
=
ME_GetTextLengthEx
(
editor
,
&
how
);
if
(
!
ret
)
if
(
!
ret
)
{
{
/*Check for valid wParam*/
/*Check for valid wParam*/
...
...
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