tweaks: elide a function that is now just one line
parent
a8ed1d7a9a
commit
dc745c0b77
|
@ -231,12 +231,6 @@ void find_and_prime_applicable_syntax(void)
|
|||
openfile->syntax = sntx;
|
||||
}
|
||||
|
||||
/* Allocate and initialize (for the given line) the cache for multiline info. */
|
||||
void set_up_multicache(linestruct *line)
|
||||
{
|
||||
line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||
}
|
||||
|
||||
/* Determine whether the matches of multiline regexes are still the same,
|
||||
* and if not, schedule a screen refresh, so things will be repainted. */
|
||||
void check_the_multis(linestruct *line)
|
||||
|
@ -308,7 +302,7 @@ void precalc_multicolorinfo(void)
|
|||
|
||||
/* For each line, allocate cache space for the multiline-regex info. */
|
||||
for (line = openfile->filetop; line != NULL; line = line->next)
|
||||
set_up_multicache(line);
|
||||
line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||
|
||||
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
||||
/* If this is not a multi-line regex, skip it. */
|
||||
|
|
|
@ -239,7 +239,6 @@ bool is_valid_unicode(wchar_t wc);
|
|||
void set_interface_colorpairs(void);
|
||||
void prepare_palette(void);
|
||||
void find_and_prime_applicable_syntax(void);
|
||||
void set_up_multicache(linestruct *line);
|
||||
void check_the_multis(linestruct *line);
|
||||
void precalc_multicolorinfo(void);
|
||||
#endif
|
||||
|
|
|
@ -2482,9 +2482,9 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
|
|||
if (openfile->syntax && !ISSET(NO_SYNTAX)) {
|
||||
const colortype *varnish = openfile->syntax->color;
|
||||
|
||||
/* If there are multiline regexes, make sure there is a cache. */
|
||||
/* If there are multiline regexes, make sure this line has a cache. */
|
||||
if (openfile->syntax->nmultis > 0 && line->multidata == NULL)
|
||||
set_up_multicache(line);
|
||||
line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||
|
||||
/* Iterate through all the coloring regexes. */
|
||||
for (; varnish != NULL; varnish = varnish->next) {
|
||||
|
|
Loading…
Reference in New Issue