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
d55bc240
Commit
d55bc240
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 run ptrs in the EM_GETLINECOUNT handler.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fe2fd44e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
editor.c
dlls/riched20/editor.c
+12
-15
No files found.
dlls/riched20/editor.c
View file @
d55bc240
...
...
@@ -4291,27 +4291,24 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
EM_GETLINECOUNT
:
{
ME_DisplayItem
*
item
=
editor
->
pBuffer
->
pLast
;
int
nRows
=
editor
->
total_rows
;
ME_DisplayItem
*
prev_para
=
NULL
,
*
last_para
=
NULL
;
last_para
=
ME_FindItemBack
(
item
,
diRun
);
prev_para
=
ME_FindItemBack
(
last_para
,
diRun
);
assert
(
last_para
);
assert
(
last_para
->
member
.
run
.
nFlags
&
MERF_ENDPARA
);
if
(
editor
->
bEmulateVersion10
&&
prev_para
&&
last_para
->
member
.
run
.
nCharOfs
==
0
&&
prev_para
->
member
.
run
.
len
==
1
&&
*
get_text
(
&
prev_para
->
member
.
run
,
0
)
==
'\r'
)
int
count
=
editor
->
total_rows
;
ME_Run
*
prev_run
,
*
last_run
;
last_run
=
para_end_run
(
para_prev
(
editor_end_para
(
editor
)
)
);
prev_run
=
run_prev_all_paras
(
last_run
);
if
(
editor
->
bEmulateVersion10
&&
prev_run
&&
last_run
->
nCharOfs
==
0
&&
prev_run
->
len
==
1
&&
*
get_text
(
prev_run
,
0
)
==
'\r'
)
{
/* In 1.0 emulation, the last solitary \r at the very end of the text
(if one exists) is NOT a line break.
FIXME: this is an ugly hack. This should have a more regular model. */
nRows
--
;
count
--
;
}
TRACE
(
"EM_GETLINECOUNT: nRows==%d
\n
"
,
nRows
);
return
max
(
1
,
nRows
);
count
=
max
(
1
,
count
);
TRACE
(
"EM_GETLINECOUNT: count==%d
\n
"
,
count
);
return
count
;
}
case
EM_LINEFROMCHAR
:
{
...
...
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