+2015-12-20 Benno Schulenberg <bensberg@justemail.net>
+ * src/files.c (display_buffer), src/nano.c (main): Precalculate the
+ multiline-regex cache data for each buffer, not just for the first.
+ This fixes Savannah bug #46511.
+
2015-12-18 Benno Schulenberg <bensberg@justemail.net>
* src/color.c (color_init): Use less #ifdefs, and adjust indentation.
* src/color.c (set_colorpairs): Improve comments and rename vars.
titlebar(NULL);
#ifndef DISABLE_COLOR
- /* Make sure we're using the buffer's associated colors, if
- * applicable. */
+ /* Make sure we're using the buffer's associated colors. */
color_init();
+
+ /* If there are multiline coloring regexes, and there is no
+ * multiline cache data yet, precalculate it now. */
+ if (openfile->syntax && openfile->syntax->nmultis > 0 &&
+ openfile->fileage->multidata == NULL)
+ precalc_multicolorinfo();
#endif
/* Update the edit window. */
fprintf(stderr, "Main: top and bottom win\n");
#endif
-#ifndef DISABLE_COLOR
- if (openfile->syntax)
- if (openfile->syntax->nmultis > 0)
- precalc_multicolorinfo();
-#endif
-
/* If a starting position was given on the command line, go there. */
if (startline > 0 || startcol > 0)
do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE, FALSE);
int do_mouse(void);
#endif
void do_output(char *output, size_t output_len, bool allow_cntrls);
+void precalc_multicolorinfo(void);
/* All functions in prompt.c. */
int do_statusbar_input(bool *ran_func, bool *finished,