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
76cfe7dc
Commit
76cfe7dc
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 whitespace test to take a run parameter.
parent
29e54f07
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
16 deletions
+14
-16
editor.h
dlls/riched20/editor.h
+0
-1
run.c
dlls/riched20/run.c
+14
-2
string.c
dlls/riched20/string.c
+0
-13
No files found.
dlls/riched20/editor.h
View file @
76cfe7dc
...
...
@@ -104,7 +104,6 @@ ME_String *ME_StrDup(const ME_String *s) DECLSPEC_HIDDEN;
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_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 @
76cfe7dc
...
...
@@ -394,6 +394,17 @@ static BOOL run_is_splittable( const ME_Run *run )
return
FALSE
;
}
static
BOOL
run_is_entirely_ws
(
const
ME_Run
*
run
)
{
WCHAR
*
str
=
get_text
(
run
,
0
),
*
p
;
int
i
,
len
=
run
->
strText
->
nLen
;
for
(
i
=
0
,
p
=
str
;
i
<
len
;
i
++
,
p
++
)
if
(
!
ME_IsWSpace
(
*
p
))
return
FALSE
;
return
TRUE
;
}
/******************************************************************************
* ME_UpdateRunFlags
*
...
...
@@ -416,8 +427,9 @@ void ME_UpdateRunFlags(ME_TextEditor *editor, ME_Run *run)
else
run
->
nFlags
&=
~
MERF_SPLITTABLE
;
if
(
!
(
run
->
nFlags
&
MERF_NOTEXT
))
{
if
(
ME_IsWhitespaces
(
strText
))
if
(
!
(
run
->
nFlags
&
MERF_NOTEXT
))
{
if
(
run_is_entirely_ws
(
run
))
run
->
nFlags
|=
MERF_WHITESPACE
|
MERF_STARTWHITE
|
MERF_ENDWHITE
;
else
{
...
...
dlls/riched20/string.c
View file @
76cfe7dc
...
...
@@ -108,19 +108,6 @@ ME_String *ME_VSplitString(ME_String *orig, int charidx)
return
s
;
}
int
ME_IsWhitespaces
(
const
ME_String
*
s
)
{
/* FIXME multibyte */
WCHAR
*
pos
=
s
->
szData
;
while
(
ME_IsWSpace
(
*
pos
++
))
;
pos
--
;
if
(
*
pos
)
return
0
;
else
return
1
;
}
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