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
cfdfe517
Commit
cfdfe517
authored
Nov 03, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Nov 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use row ptrs in the EM_GETLINELENGTH handler.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bfa143a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
editor.c
dlls/riched20/editor.c
+9
-16
No files found.
dlls/riched20/editor.c
View file @
cfdfe517
...
...
@@ -4341,8 +4341,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case
EM_LINELENGTH
:
{
ME_
DisplayItem
*
item
,
*
item_end
;
int
nChars
=
0
,
nThisLineOfs
=
0
,
nNextLineOfs
=
0
;
ME_
Row
*
row
;
int
start_ofs
,
end_ofs
;
ME_Cursor
cursor
;
if
(
wParam
>
ME_GetTextLength
(
editor
))
...
...
@@ -4353,20 +4353,13 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
return
0
;
}
cursor_from_char_ofs
(
editor
,
wParam
,
&
cursor
);
item
=
ME_RowStart
(
cursor
.
pRun
);
nThisLineOfs
=
run_char_ofs
(
&
ME_FindItemFwd
(
item
,
diRun
)
->
member
.
run
,
0
);
item_end
=
ME_FindItemFwd
(
item
,
diStartRowOrParagraphOrEnd
);
if
(
item_end
->
type
==
diStartRow
)
nNextLineOfs
=
run_char_ofs
(
&
ME_FindItemFwd
(
item_end
,
diRun
)
->
member
.
run
,
0
);
else
{
ME_DisplayItem
*
endRun
=
ME_FindItemBack
(
item_end
,
diRun
);
assert
(
endRun
&&
endRun
->
member
.
run
.
nFlags
&
MERF_ENDPARA
);
nNextLineOfs
=
run_char_ofs
(
&
endRun
->
member
.
run
,
0
);
}
nChars
=
nNextLineOfs
-
nThisLineOfs
;
TRACE
(
"EM_LINELENGTH(%ld)==%d
\n
"
,
wParam
,
nChars
);
return
nChars
;
row
=
row_from_cursor
(
&
cursor
);
row_first_cursor
(
row
,
&
cursor
);
start_ofs
=
ME_GetCursorOfs
(
&
cursor
);
row_end_cursor
(
row
,
&
cursor
,
FALSE
);
end_ofs
=
ME_GetCursorOfs
(
&
cursor
);
TRACE
(
"EM_LINELENGTH(%ld)==%d
\n
"
,
wParam
,
end_ofs
-
start_ofs
);
return
end_ofs
-
start_ofs
;
}
case
EM_EXLIMITTEXT
:
{
...
...
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