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
160f65f2
Commit
160f65f2
authored
Dec 06, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Dec 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Move the various selection setting methods to a common function.
parent
660bc8b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
editor.c
dlls/riched20/editor.c
+19
-18
No files found.
dlls/riched20/editor.c
View file @
160f65f2
...
...
@@ -2016,6 +2016,22 @@ static int ME_GetTextRange(ME_TextEditor *editor, WCHAR *strText,
}
}
static
int
handle_EM_EXSETSEL
(
ME_TextEditor
*
editor
,
int
to
,
int
from
)
{
int
end
;
TRACE
(
"%d - %d
\n
"
,
to
,
from
);
ME_InvalidateSelection
(
editor
);
end
=
ME_SetSelection
(
editor
,
to
,
from
);
ME_InvalidateSelection
(
editor
);
ITextHost_TxShowCaret
(
editor
->
texthost
,
FALSE
);
ME_ShowCaret
(
editor
);
ME_SendSelChange
(
editor
);
return
end
;
}
typedef
struct
tagME_GlobalDestStruct
{
HGLOBAL
hData
;
...
...
@@ -2383,7 +2399,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
case
'A'
:
if
(
ctrl_is_down
)
{
ME_SetSelection
(
editor
,
0
,
-
1
);
handle_EM_EXSETSEL
(
editor
,
0
,
-
1
);
return
TRUE
;
}
break
;
...
...
@@ -3246,12 +3262,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
EM_SETSEL
:
{
ME_InvalidateSelection
(
editor
);
ME_SetSelection
(
editor
,
wParam
,
lParam
);
ME_InvalidateSelection
(
editor
);
ITextHost_TxShowCaret
(
editor
->
texthost
,
FALSE
);
ME_ShowCaret
(
editor
);
ME_SendSelChange
(
editor
);
handle_EM_EXSETSEL
(
editor
,
wParam
,
lParam
);
return
0
;
}
case
EM_SETSCROLLPOS
:
...
...
@@ -3275,19 +3286,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
EM_EXSETSEL
:
{
int
end
;
CHARRANGE
range
=
*
(
CHARRANGE
*
)
lParam
;
TRACE
(
"EM_EXSETSEL (%d,%d)
\n
"
,
range
.
cpMin
,
range
.
cpMax
);
ME_InvalidateSelection
(
editor
);
end
=
ME_SetSelection
(
editor
,
range
.
cpMin
,
range
.
cpMax
);
ME_InvalidateSelection
(
editor
);
ITextHost_TxShowCaret
(
editor
->
texthost
,
FALSE
);
ME_ShowCaret
(
editor
);
ME_SendSelChange
(
editor
);
return
end
;
return
handle_EM_EXSETSEL
(
editor
,
range
.
cpMin
,
range
.
cpMax
);
}
case
EM_SHOWSCROLLBAR
:
{
...
...
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