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
29e54f07
Commit
29e54f07
authored
Jan 31, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Jan 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Rewrite the run splittable test to take a run parameter.
parent
35f21ac8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
editor.h
dlls/riched20/editor.h
+0
-1
run.c
dlls/riched20/run.c
+19
-1
string.c
dlls/riched20/string.c
+0
-15
No files found.
dlls/riched20/editor.h
View file @
29e54f07
...
...
@@ -105,7 +105,6 @@ void ME_DestroyString(ME_String *s) DECLSPEC_HIDDEN;
void
ME_AppendString
(
ME_String
*
s1
,
const
ME_String
*
s2
)
DECLSPEC_HIDDEN
;
ME_String
*
ME_VSplitString
(
ME_String
*
orig
,
int
nVPos
)
DECLSPEC_HIDDEN
;
int
ME_IsWhitespaces
(
const
ME_String
*
s
)
DECLSPEC_HIDDEN
;
int
ME_IsSplitable
(
const
ME_String
*
s
)
DECLSPEC_HIDDEN
;
int
ME_FindNonWhitespaceV
(
const
ME_String
*
s
,
int
nVChar
)
DECLSPEC_HIDDEN
;
int
ME_CallWordBreakProc
(
ME_TextEditor
*
editor
,
ME_String
*
str
,
INT
start
,
INT
code
)
DECLSPEC_HIDDEN
;
void
ME_StrDeleteV
(
ME_String
*
s
,
int
nVChar
,
int
nChars
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/run.c
View file @
29e54f07
...
...
@@ -376,6 +376,24 @@ ME_InsertRunAtCursor(ME_TextEditor *editor, ME_Cursor *cursor, ME_Style *style,
return
pDI
;
}
static
BOOL
run_is_splittable
(
const
ME_Run
*
run
)
{
WCHAR
*
str
=
get_text
(
run
,
0
),
*
p
;
int
i
,
len
=
run
->
strText
->
nLen
;
BOOL
found_ink
=
FALSE
;
for
(
i
=
0
,
p
=
str
;
i
<
len
;
i
++
,
p
++
)
{
if
(
ME_IsWSpace
(
*
p
))
{
if
(
found_ink
)
return
TRUE
;
}
else
found_ink
=
TRUE
;
}
return
FALSE
;
}
/******************************************************************************
* ME_UpdateRunFlags
*
...
...
@@ -393,7 +411,7 @@ void ME_UpdateRunFlags(ME_TextEditor *editor, ME_Run *run)
else
run
->
nFlags
&=
~
MERF_HIDDEN
;
if
(
ME_IsSplitable
(
strText
))
if
(
run_is_splittable
(
run
))
run
->
nFlags
|=
MERF_SPLITTABLE
;
else
run
->
nFlags
&=
~
MERF_SPLITTABLE
;
...
...
dlls/riched20/string.c
View file @
29e54f07
...
...
@@ -121,21 +121,6 @@ int ME_IsWhitespaces(const ME_String *s)
return
1
;
}
int
ME_IsSplitable
(
const
ME_String
*
s
)
{
WCHAR
*
pos
=
s
->
szData
;
WCHAR
ch
;
while
(
ME_IsWSpace
(
*
pos
++
))
;
pos
--
;
while
((
ch
=
*
pos
++
)
!=
0
)
{
if
(
ME_IsWSpace
(
ch
))
return
1
;
}
return
0
;
}
void
ME_StrDeleteV
(
ME_String
*
s
,
int
nVChar
,
int
nChars
)
{
int
end_ofs
=
nVChar
+
nChars
;
...
...
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