Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
414a1ecc
Commit
414a1ecc
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: and rename another variable, to keep in style
parent
e0bdf671
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/color.c
+9
-9
src/color.c
with
9 additions
and
9 deletions
+9
-9
src/color.c
View file @
414a1ecc
...
...
@@ -398,7 +398,7 @@ void precalc_multicolorinfo(void)
{
const
colortype
*
ink
;
regmatch_t
startmatch
,
endmatch
;
filestruct
*
line
,
*
endptr
;
filestruct
*
line
,
*
tailline
;
if
(
openfile
->
colorstrings
==
NULL
||
ISSET
(
NO_COLOR_SYNTAX
))
return
;
...
...
@@ -443,28 +443,28 @@ void precalc_multicolorinfo(void)
}
/* Look for an end match on later lines. */
endptr
=
line
->
next
;
tailline
=
line
->
next
;
while
(
endptr
!=
NULL
)
{
if
(
regexec
(
ink
->
end
,
endptr
->
data
,
1
,
&
endmatch
,
0
)
==
0
)
while
(
tailline
!=
NULL
)
{
if
(
regexec
(
ink
->
end
,
tailline
->
data
,
1
,
&
endmatch
,
0
)
==
0
)
break
;
endptr
=
endptr
->
next
;
tailline
=
tailline
->
next
;
}
if
(
endptr
==
NULL
)
if
(
tailline
==
NULL
)
break
;
/* We found it, we found it, la la la la la. Mark all
* the lines in between and the end properly. */
line
->
multidata
[
ink
->
id
]
=
CENDAFTER
;
for
(
line
=
line
->
next
;
line
!=
endptr
;
line
=
line
->
next
)
{
for
(
line
=
line
->
next
;
line
!=
tailline
;
line
=
line
->
next
)
{
alloc_multidata_if_needed
(
line
);
line
->
multidata
[
ink
->
id
]
=
CWHOLELINE
;
}
alloc_multidata_if_needed
(
endptr
);
line
->
multidata
[
ink
->
id
]
=
CBEGINBEFORE
;
alloc_multidata_if_needed
(
tailline
);
tail
line
->
multidata
[
ink
->
id
]
=
CBEGINBEFORE
;
/* Begin looking for a new start after the end match. */
index
=
endmatch
.
rm_eo
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help