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
8205252f
Commit
8205252f
authored
Jan 13, 2006
by
Phil Krylov
Committed by
Alexandre Julliard
Jan 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Fixed some selection painting bugs.
parent
9d90ef01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
caret.c
dlls/riched20/caret.c
+1
-2
paint.c
dlls/riched20/paint.c
+17
-12
No files found.
dlls/riched20/caret.c
View file @
8205252f
...
...
@@ -725,10 +725,9 @@ void ME_LButtonDown(ME_TextEditor *editor, int x, int y)
is_selection
=
1
;
}
}
ME_InvalidateSelection
(
editor
);
HideCaret
(
editor
->
hWnd
);
ME_MoveCaret
(
editor
);
if
(
is_selection
)
ME_Repaint
(
editor
);
ShowCaret
(
editor
->
hWnd
);
ME_ClearTempStyle
(
editor
);
ME_SendSelChange
(
editor
);
...
...
dlls/riched20/paint.c
View file @
8205252f
...
...
@@ -2,6 +2,7 @@
* RichEdit - painting functions
*
* Copyright 2004 by Krzysztof Foltman
* Copyright 2005 by Phil Krylov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -265,25 +266,29 @@ void ME_DrawGraphics(ME_Context *c, int x, int y, ME_Run *run,
static
void
ME_DrawRun
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_DisplayItem
*
rundi
,
ME_Paragraph
*
para
)
{
ME_Run
*
run
=
&
rundi
->
member
.
run
;
ME_DisplayItem
*
start
=
ME_FindItemBack
(
rundi
,
diStartRow
);
int
runofs
=
run
->
nCharOfs
+
para
->
nCharOfs
;
int
nSelFrom
,
nSelTo
;
const
WCHAR
wszSpace
[]
=
{
' '
,
0
};
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
,
NULL
,
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
|
MERF_TAB
))
return
;
if
(
run
->
nFlags
&
MERF_GRAPHICS
)
{
int
blfrom
,
blto
;
ME_GetSelection
(
c
->
editor
,
&
blfrom
,
&
blto
);
ME_DrawGraphics
(
c
,
x
,
y
,
run
,
para
,
(
runofs
>=
blfrom
)
&&
(
runofs
<
blto
));
}
else
{
int
blfrom
,
blto
;
ME_DisplayItem
*
start
=
ME_FindItemBack
(
rundi
,
diStartRow
);
ME_GetSelection
(
c
->
editor
,
&
blfrom
,
&
blto
);
if
(
run
->
nFlags
&
MERF_GRAPHICS
)
ME_DrawGraphics
(
c
,
x
,
y
,
run
,
para
,
(
runofs
>=
nSelFrom
)
&&
(
runofs
<
nSelTo
));
else
ME_DrawTextWithStyle
(
c
,
x
,
y
,
run
->
strText
->
szData
,
ME_StrVLen
(
run
->
strText
),
run
->
style
,
NULL
,
blfrom
-
runofs
,
blto
-
runofs
,
c
->
pt
.
y
+
start
->
member
.
row
.
nYPos
,
start
->
member
.
row
.
nHeight
);
}
nSelFrom
-
runofs
,
nSelTo
-
runofs
,
c
->
pt
.
y
+
start
->
member
.
row
.
nYPos
,
start
->
member
.
row
.
nHeight
);
}
COLORREF
ME_GetBackColor
(
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