Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a490e155
Commit
a490e155
authored
Feb 06, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Feb 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Simplified the character length delete protection.
The value for nMaxChars can be found easier by using ME_GetTextLength.
parent
1f3fd357
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
caret.c
dlls/riched20/caret.c
+2
-8
No files found.
dlls/riched20/caret.c
View file @
a490e155
...
...
@@ -273,14 +273,8 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars,
int
totalChars
=
nChars
;
ME_DisplayItem
*
start_para
;
{
/* Prevent deletion past last end of paragraph run. */
ME_DisplayItem
*
pTextEnd
=
editor
->
pBuffer
->
pLast
;
int
nMaxChars
=
pTextEnd
->
member
.
para
.
prev_para
->
member
.
para
.
nCharOfs
;
nMaxChars
+=
ME_FindItemBack
(
pTextEnd
,
diRun
)
->
member
.
run
.
nCharOfs
;
nMaxChars
-=
nOfs
;
nChars
=
min
(
nChars
,
nMaxChars
);
}
/* Prevent deletion past last end of paragraph run. */
nChars
=
min
(
nChars
,
ME_GetTextLength
(
editor
)
-
nOfs
);
ME_CursorFromCharOfs
(
editor
,
nOfs
,
&
c
);
start_para
=
ME_GetParagraph
(
c
.
pRun
);
...
...
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