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
a6d41a03
Commit
a6d41a03
authored
Oct 12, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use ME_Paragraph ptrs in InternalDeleteText().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f648eff1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
caret.c
dlls/riched20/caret.c
+9
-9
No files found.
dlls/riched20/caret.c
View file @
a6d41a03
...
...
@@ -308,13 +308,13 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
int
nOfs
=
ME_GetCursorOfs
(
start
),
text_len
=
ME_GetTextLength
(
editor
);
int
shift
=
0
;
int
totalChars
=
nChars
;
ME_
DisplayItem
*
start_para
;
ME_
Paragraph
*
start_para
;
BOOL
delete_all
=
FALSE
;
/* Prevent deletion past last end of paragraph run. */
nChars
=
min
(
nChars
,
text_len
-
nOfs
);
if
(
nChars
==
text_len
)
delete_all
=
TRUE
;
start_para
=
c
.
pP
ara
;
start_para
=
&
c
.
pPara
->
member
.
p
ara
;
if
(
!
bForce
)
{
...
...
@@ -349,19 +349,19 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
run
->
nCharOfs
);
if
(
!
editor
->
bEmulateVersion10
)
/* v4.1 */
{
ME_
DisplayItem
*
next_para
=
ME_FindItemFwd
(
c
.
pRun
,
diParagraphOrEnd
)
;
ME_
DisplayItem
*
this_para
=
next_para
->
member
.
para
.
prev_para
;
ME_
Paragraph
*
this_para
=
run
->
para
;
ME_
Paragraph
*
next_para
=
para_next
(
this_para
)
;
/* The end of paragraph before a table row is only deleted if there
* is nothing else on the line before it. */
if
(
this_para
==
start_para
&&
next_para
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
)
if
(
this_para
==
start_para
&&
next_para
->
nFlags
&
MEPF_ROWSTART
)
{
/* If the paragraph will be empty, then it should be deleted, however
* it still might have text right now which would inherit the
* MEPF_STARTROW property if we joined it right now.
* Instead we will delete it after the preceding text is deleted. */
if
(
nOfs
>
this_para
->
member
.
para
.
nCharOfs
)
{
if
(
nOfs
>
this_para
->
nCharOfs
)
{
/* Skip this end of line. */
nChars
-=
(
eollen
<
nChars
)
?
eollen
:
nChars
;
continue
;
...
...
@@ -383,7 +383,7 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
c
.
nOffset
-=
nCharsToDelete
;
para_mark_rewrap
(
editor
,
&
ME_FindItemBack
(
c
.
pRun
,
diParagraph
)
->
member
.
para
);
para_mark_rewrap
(
editor
,
c
.
pRun
->
member
.
run
.
para
);
cursor
=
c
;
/* nChars is the number of characters that should be deleted from the
...
...
@@ -447,7 +447,7 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
continue
;
}
}
if
(
delete_all
)
ME_SetDefaultParaFormat
(
editor
,
&
start_para
->
member
.
para
.
fmt
);
if
(
delete_all
)
ME_SetDefaultParaFormat
(
editor
,
&
start_para
->
fmt
);
return
TRUE
;
}
...
...
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