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
8046b5bc
Commit
8046b5bc
authored
Nov 02, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Nov 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use a run ptr in the link notify function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
50c8fe45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
editor.c
dlls/riched20/editor.c
+8
-9
No files found.
dlls/riched20/editor.c
View file @
8046b5bc
...
...
@@ -3451,8 +3451,9 @@ static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM
int
x
,
y
;
BOOL
isExact
;
ME_Cursor
cursor
;
/* The start of the clicked text. */
ME_Run
*
run
;
ENLINK
info
;
x
=
(
short
)
LOWORD
(
lParam
);
y
=
(
short
)
HIWORD
(
lParam
);
ME_CharFromPos
(
editor
,
x
,
y
,
&
cursor
,
&
isExact
);
...
...
@@ -3460,8 +3461,6 @@ static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM
if
(
is_link
(
&
cursor
.
pRun
->
member
.
run
))
{
/* The clicked run has CFE_LINK set */
ME_DisplayItem
*
di
;
info
.
nmhdr
.
hwndFrom
=
NULL
;
info
.
nmhdr
.
idFrom
=
0
;
info
.
nmhdr
.
code
=
EN_LINK
;
...
...
@@ -3472,15 +3471,15 @@ static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM
/* find the first contiguous run with CFE_LINK set */
info
.
chrg
.
cpMin
=
ME_GetCursorOfs
(
&
cursor
);
di
=
cursor
.
pR
un
;
while
(
ME_PrevRun
(
NULL
,
&
di
,
FALSE
)
&&
is_link
(
&
di
->
member
.
run
))
info
.
chrg
.
cpMin
-=
di
->
member
.
run
.
len
;
run
=
&
cursor
.
pRun
->
member
.
r
un
;
while
(
(
run
=
run_prev
(
run
))
&&
is_link
(
run
))
info
.
chrg
.
cpMin
-=
run
->
len
;
/* find the last contiguous run with CFE_LINK set */
info
.
chrg
.
cpMax
=
ME_GetCursorOfs
(
&
cursor
)
+
cursor
.
pRun
->
member
.
run
.
len
;
di
=
cursor
.
pR
un
;
while
(
ME_NextRun
(
NULL
,
&
di
,
FALSE
)
&&
is_link
(
&
di
->
member
.
run
))
info
.
chrg
.
cpMax
+=
di
->
member
.
run
.
len
;
run
=
&
cursor
.
pRun
->
member
.
r
un
;
while
(
(
run
=
run_next
(
run
))
&&
is_link
(
run
))
info
.
chrg
.
cpMax
+=
run
->
len
;
ITextHost_TxNotify
(
editor
->
texthost
,
info
.
nmhdr
.
code
,
&
info
);
}
...
...
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