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
1ceb903f
Commit
1ceb903f
authored
Feb 07, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Feb 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Simplified ME_UpdateSelectionLinkAttribute.
parent
71d797c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
26 deletions
+10
-26
editor.c
dlls/riched20/editor.c
+10
-26
No files found.
dlls/riched20/editor.c
View file @
1ceb903f
...
...
@@ -2033,40 +2033,24 @@ ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM* wParam, LPARAM* lParam)
static
void
ME_UpdateSelectionLinkAttribute
(
ME_TextEditor
*
editor
)
{
ME_DisplayItem
*
startPara
,
*
endPara
;
ME_DisplayItem
*
item
;
ME_Cursor
cursor
;
ME_DisplayItem
*
startPara
,
*
endPara
;
ME_DisplayItem
*
prev_para
;
int
from
,
to
;
ME_GetSelection
(
editor
,
&
from
,
&
to
);
if
(
from
>
to
)
from
^=
to
,
to
^=
from
,
from
^=
to
;
startPara
=
NULL
;
endPara
=
NULL
;
/* Find paragraph previous to the one that contains start cursor */
ME_CursorFromCharOfs
(
editor
,
from
,
&
cursor
);
item
=
cursor
.
pRun
;
if
(
item
)
{
startPara
=
ME_FindItemBack
(
item
,
diParagraph
);
item
=
startPara
->
member
.
para
.
prev_para
;
if
(
item
&&
item
->
type
==
diParagraph
)
startPara
=
item
;
}
ME_RunOfsFromCharOfs
(
editor
,
from
,
&
startPara
,
NULL
,
NULL
);
prev_para
=
startPara
->
member
.
para
.
prev_para
;
if
(
prev_para
->
type
==
diParagraph
)
startPara
=
prev_para
;
/* Find paragraph that contains end cursor */
ME_CursorFromCharOfs
(
editor
,
to
,
&
cursor
);
item
=
cursor
.
pRun
;
if
(
item
)
{
endPara
=
ME_FindItemFwd
(
item
,
diParagraph
);
}
ME_RunOfsFromCharOfs
(
editor
,
to
,
&
endPara
,
NULL
,
NULL
);
endPara
=
endPara
->
member
.
para
.
next_para
;
if
(
startPara
&&
endPara
)
{
ME_UpdateLinkAttribute
(
editor
,
startPara
->
member
.
para
.
nCharOfs
,
endPara
->
member
.
para
.
nCharOfs
);
}
else
if
(
startPara
)
{
ME_UpdateLinkAttribute
(
editor
,
startPara
->
member
.
para
.
nCharOfs
,
-
1
);
}
ME_UpdateLinkAttribute
(
editor
,
startPara
->
member
.
para
.
nCharOfs
,
endPara
->
member
.
para
.
nCharOfs
);
}
static
BOOL
...
...
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