tweaks: elide a function that is now just one line
Этот коммит содержится в:
родитель
a8ed1d7a9a
Коммит
dc745c0b77
@ -231,12 +231,6 @@ void find_and_prime_applicable_syntax(void)
|
|||||||
openfile->syntax = sntx;
|
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,
|
/* Determine whether the matches of multiline regexes are still the same,
|
||||||
* and if not, schedule a screen refresh, so things will be repainted. */
|
* and if not, schedule a screen refresh, so things will be repainted. */
|
||||||
void check_the_multis(linestruct *line)
|
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 each line, allocate cache space for the multiline-regex info. */
|
||||||
for (line = openfile->filetop; line != NULL; line = line->next)
|
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) {
|
for (ink = openfile->syntax->color; ink != NULL; ink = ink->next) {
|
||||||
/* If this is not a multi-line regex, skip it. */
|
/* 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 set_interface_colorpairs(void);
|
||||||
void prepare_palette(void);
|
void prepare_palette(void);
|
||||||
void find_and_prime_applicable_syntax(void);
|
void find_and_prime_applicable_syntax(void);
|
||||||
void set_up_multicache(linestruct *line);
|
|
||||||
void check_the_multis(linestruct *line);
|
void check_the_multis(linestruct *line);
|
||||||
void precalc_multicolorinfo(void);
|
void precalc_multicolorinfo(void);
|
||||||
#endif
|
#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)) {
|
if (openfile->syntax && !ISSET(NO_SYNTAX)) {
|
||||||
const colortype *varnish = openfile->syntax->color;
|
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)
|
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. */
|
/* Iterate through all the coloring regexes. */
|
||||||
for (; varnish != NULL; varnish = varnish->next) {
|
for (; varnish != NULL; varnish = varnish->next) {
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user