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
3b86c7a1
Commit
3b86c7a1
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: discard the now unused multidata-resetting routine
parent
7ef5c532
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
+2
-51
src/color.c
with
2 additions
and
51 deletions
+2
-51
src/color.c
View file @
3b86c7a1
...
...
@@ -290,49 +290,8 @@ void color_update(void)
}
}
/* Reset the multiline coloring cache for one specific regex (given by
* index) for lines that need reevaluation. */
void
reset_multis_for_id
(
filestruct
*
fileptr
,
int
index
)
{
filestruct
*
row
;
/* Reset the cache of earlier lines, as far back as needed. */
for
(
row
=
fileptr
->
prev
;
row
!=
NULL
;
row
=
row
->
prev
)
{
alloc_multidata_if_needed
(
row
);
if
(
row
->
multidata
[
index
]
==
CNONE
)
break
;
row
->
multidata
[
index
]
=
-
1
;
}
for
(;
row
!=
NULL
;
row
=
row
->
prev
)
{
alloc_multidata_if_needed
(
row
);
if
(
row
->
multidata
[
index
]
!=
CNONE
)
break
;
row
->
multidata
[
index
]
=
-
1
;
}
/* Reset the cache of the current line. */
fileptr
->
multidata
[
index
]
=
-
1
;
/* Reset the cache of later lines, as far ahead as needed. */
for
(
row
=
fileptr
->
next
;
row
!=
NULL
;
row
=
row
->
next
)
{
alloc_multidata_if_needed
(
row
);
if
(
row
->
multidata
[
index
]
==
CNONE
)
break
;
row
->
multidata
[
index
]
=
-
1
;
}
for
(;
row
!=
NULL
;
row
=
row
->
next
)
{
alloc_multidata_if_needed
(
row
);
if
(
row
->
multidata
[
index
]
!=
CNONE
)
break
;
row
->
multidata
[
index
]
=
-
1
;
}
refresh_needed
=
TRUE
;
}
/* Reset multi-line strings around the filestruct fileptr, trying to be
* smart about stopping. Bool force means: reset everything regardless,
* useful when we don't know how much screen state has changed. */
/* Determine whether the matches of multiline regexes are still the same,
* and if not, schedule a screen refresh, so things will be repainted. */
void
reset_multis
(
filestruct
*
fileptr
,
bool
force
)
{
const
colortype
*
ink
;
...
...
@@ -372,14 +331,6 @@ void reset_multis(filestruct *fileptr, bool force)
refresh_needed
=
TRUE
;
return
;
/* If we got here, things have changed. */
reset_multis_for_id
(
fileptr
,
ink
->
id
);
/* If start and end are the same, push the resets further. */
if
(
force
==
FALSE
&&
!
nobegin
&&
!
noend
&&
startmatch
.
rm_so
==
endmatch
.
rm_so
)
reset_multis_for_id
(
fileptr
,
ink
->
id
);
}
}
...
...
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