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
2429e8b1
Commit
2429e8b1
authored
Jan 07, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Jan 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Don't split a run if the cursor is at the end of it.
parent
7e7a8f1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
run.c
dlls/riched20/run.c
+16
-6
No files found.
dlls/riched20/run.c
View file @
2429e8b1
...
...
@@ -658,17 +658,20 @@ void ME_SetSelectionCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt)
*/
void
ME_SetCharFormat
(
ME_TextEditor
*
editor
,
ME_Cursor
*
start
,
ME_Cursor
*
end
,
CHARFORMAT2W
*
pFmt
)
{
ME_DisplayItem
*
run
,
*
end_run
=
NULL
;
ME_DisplayItem
*
run
,
*
start_run
=
start
->
pRun
,
*
end_run
=
NULL
;
if
(
end
&&
start
->
pRun
==
end
->
pRun
&&
start
->
nOffset
==
end
->
nOffset
)
return
;
if
(
start
->
nOffset
)
if
(
start
->
nOffset
==
start
->
pRun
->
member
.
run
.
len
)
start_run
=
ME_FindItemFwd
(
start
->
pRun
,
diRun
);
else
if
(
start
->
nOffset
)
{
/* SplitRunSimple may or may not update the cursors, depending on whether they
* are selection cursors, but we need to make sure they are valid. */
int
split_offset
=
start
->
nOffset
;
ME_DisplayItem
*
split_run
=
ME_SplitRunSimple
(
editor
,
start
);
start_run
=
start
->
pRun
;
if
(
end
&&
end
->
pRun
==
split_run
)
{
end
->
pRun
=
start
->
pRun
;
...
...
@@ -676,11 +679,18 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C
}
}
if
(
end
&&
end
->
nOffset
)
ME_SplitRunSimple
(
editor
,
end
);
end_run
=
end
?
end
->
pRun
:
NULL
;
if
(
end
)
{
if
(
end
->
nOffset
==
end
->
pRun
->
member
.
run
.
len
)
end_run
=
ME_FindItemFwd
(
end
->
pRun
,
diRun
);
else
{
if
(
end
->
nOffset
)
ME_SplitRunSimple
(
editor
,
end
);
end_run
=
end
->
pRun
;
}
}
for
(
run
=
start
->
pR
un
;
run
!=
end_run
;
run
=
ME_FindItemFwd
(
run
,
diRun
))
for
(
run
=
start
_r
un
;
run
!=
end_run
;
run
=
ME_FindItemFwd
(
run
,
diRun
))
{
ME_Style
*
new_style
=
ME_ApplyStyle
(
run
->
member
.
run
.
style
,
pFmt
);
...
...
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