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
c5b13787
Commit
c5b13787
authored
Nov 02, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Nov 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use para and row ptrs in the EM_GETFIRSTVISIBLELINE handler.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8046b5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
editor.c
dlls/riched20/editor.c
+15
-16
No files found.
dlls/riched20/editor.c
View file @
c5b13787
...
...
@@ -4044,25 +4044,24 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
return
((
PARAFORMAT2
*
)
lParam
)
->
dwMask
;
case
EM_GETFIRSTVISIBLELINE
:
{
ME_DisplayItem
*
p
=
editor
->
pBuffer
->
pFirst
;
ME_Paragraph
*
para
=
editor_first_para
(
editor
);
ME_Row
*
row
;
int
y
=
editor
->
vert_si
.
nPos
;
int
ypara
=
0
;
int
count
=
0
;
int
ystart
,
yend
;
while
(
p
)
{
p
=
ME_FindItemFwd
(
p
,
diStartRowOrParagraphOrEnd
);
if
(
p
->
type
==
diTextEnd
)
break
;
if
(
p
->
type
==
diParagraph
)
{
ypara
=
p
->
member
.
para
.
pt
.
y
;
continue
;
}
ystart
=
ypara
+
p
->
member
.
row
.
pt
.
y
;
yend
=
ystart
+
p
->
member
.
row
.
nHeight
;
if
(
y
<
yend
)
{
break
;
}
while
(
para_next
(
para
))
{
if
(
y
<
para
->
pt
.
y
+
para
->
nHeight
)
break
;
count
+=
para
->
nRows
;
para
=
para_next
(
para
);
}
row
=
para_first_row
(
para
);
while
(
row
)
{
if
(
y
<
para
->
pt
.
y
+
row
->
pt
.
y
+
row
->
nHeight
)
break
;
count
++
;
row
=
row_next
(
row
);
}
return
count
;
}
...
...
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