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
9bcfa942
Commit
9bcfa942
authored
Jul 10, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Jul 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Prevented underlining the end of paragraph character.
parent
5ec188d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
5 deletions
+43
-5
paint.c
dlls/riched20/paint.c
+43
-5
No files found.
dlls/riched20/paint.c
View file @
9bcfa942
...
...
@@ -160,6 +160,41 @@ int ME_twips2pointsY(ME_Context *c, int y)
return
y
*
c
->
dpi
.
cy
*
c
->
editor
->
nZoomNumerator
/
1440
/
c
->
editor
->
nZoomDenominator
;
}
static
void
ME_HighlightSpace
(
ME_Context
*
c
,
int
x
,
int
y
,
LPCWSTR
szText
,
int
nChars
,
ME_Style
*
s
,
int
width
,
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
{
HDC
hDC
=
c
->
hDC
;
HGDIOBJ
hOldFont
=
NULL
;
SIZE
sz
;
int
selWidth
;
/* Only highlight if there is a selection in the run and when
* EM_HIDESELECTION is not being used to hide the selection. */
if
(
nSelFrom
>=
nChars
||
nSelTo
<
0
||
nSelFrom
>=
nSelTo
||
c
->
editor
->
bHideSelection
)
return
;
hOldFont
=
ME_SelectStyleFont
(
c
,
s
);
if
(
width
<=
0
)
{
GetTextExtentPoint32W
(
hDC
,
szText
,
nChars
,
&
sz
);
width
=
sz
.
cx
;
}
if
(
nSelFrom
<
0
)
nSelFrom
=
0
;
if
(
nSelTo
>
nChars
)
nSelTo
=
nChars
;
GetTextExtentPoint32W
(
hDC
,
szText
,
nSelFrom
,
&
sz
);
x
+=
sz
.
cx
;
if
(
nSelTo
!=
nChars
)
{
GetTextExtentPoint32W
(
hDC
,
szText
+
nSelFrom
,
nSelTo
-
nSelFrom
,
&
sz
);
selWidth
=
sz
.
cx
;
}
else
{
selWidth
=
width
-
sz
.
cx
;
}
ME_UnselectStyleFont
(
c
,
s
,
hOldFont
);
PatBlt
(
hDC
,
x
,
ymin
,
selWidth
,
cy
,
DSTINVERT
);
}
static
void
ME_DrawTextWithStyle
(
ME_Context
*
c
,
int
x
,
int
y
,
LPCWSTR
szText
,
int
nChars
,
ME_Style
*
s
,
int
width
,
int
nSelFrom
,
int
nSelTo
,
int
ymin
,
int
cy
)
...
...
@@ -287,14 +322,17 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa
ME_GetSelection
(
c
->
editor
,
&
nSelFrom
,
&
nSelTo
);
/* Draw selected end-of-paragraph mark */
if
(
run
->
nFlags
&
MERF_ENDPARA
&&
runofs
>=
nSelFrom
&&
runofs
<
nSelTo
)
ME_DrawTextWithStyle
(
c
,
x
,
y
,
wszSpace
,
1
,
run
->
style
,
0
,
0
,
1
,
c
->
pt
.
y
+
start
->
member
.
row
.
nYPos
,
start
->
member
.
row
.
nHeight
);
/* you can always comment it out if you need visible paragraph marks */
if
(
run
->
nFlags
&
MERF_ENDPARA
)
{
if
(
runofs
>=
nSelFrom
&&
runofs
<
nSelTo
)
{
ME_HighlightSpace
(
c
,
x
,
y
,
wszSpace
,
1
,
run
->
style
,
0
,
0
,
1
,
c
->
pt
.
y
+
start
->
member
.
row
.
nYPos
,
start
->
member
.
row
.
nHeight
);
}
return
;
}
if
(
run
->
nFlags
&
(
MERF_TAB
|
MERF_CELL
))
{
...
...
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