Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
352e7664
Commit
352e7664
authored
Oct 30, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use paragraph ptrs in the selection link check function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bc67cfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
editor.c
dlls/riched20/editor.c
+10
-13
No files found.
dlls/riched20/editor.c
View file @
352e7664
...
...
@@ -2426,30 +2426,27 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam)
static
void
ME_UpdateSelectionLinkAttribute
(
ME_TextEditor
*
editor
)
{
ME_DisplayItem
*
startPara
,
*
endPara
;
ME_DisplayItem
*
prev_para
;
ME_Cursor
*
from
,
*
to
;
ME_Cursor
start
;
int
nChars
;
ME_Paragraph
*
start_para
,
*
end_para
;
ME_Cursor
*
from
,
*
to
,
start
;
int
num_chars
;
if
(
!
editor
->
AutoURLDetect_bEnable
)
return
;
ME_GetSelection
(
editor
,
&
from
,
&
to
);
/* Find paragraph previous to the one that contains start cursor */
startPara
=
from
->
pPara
;
prev_para
=
startPara
->
member
.
para
.
prev_para
;
if
(
prev_para
->
type
==
diParagraph
)
startPara
=
prev_para
;
start_para
=
&
from
->
pPara
->
member
.
para
;
if
(
para_prev
(
start_para
))
start_para
=
para_prev
(
start_para
);
/* Find paragraph that contains end cursor */
end
Para
=
to
->
pPara
->
member
.
para
.
next_para
;
end
_para
=
para_next
(
&
to
->
pPara
->
member
.
para
)
;
start
.
pPara
=
startPara
;
start
.
pRun
=
ME_FindItemFwd
(
startPara
,
diRun
);
start
.
pPara
=
para_get_di
(
start_para
)
;
start
.
pRun
=
run_get_di
(
para_first_run
(
start_para
)
);
start
.
nOffset
=
0
;
n
Chars
=
endPara
->
member
.
para
.
nCharOfs
-
startPara
->
member
.
para
.
nCharOfs
;
n
um_chars
=
end_para
->
nCharOfs
-
start_para
->
nCharOfs
;
ME_UpdateLinkAttribute
(
editor
,
&
start
,
nChars
);
ME_UpdateLinkAttribute
(
editor
,
&
start
,
num_chars
);
}
static
BOOL
handle_enter
(
ME_TextEditor
*
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