diff --git a/src/files.c b/src/files.c index 624771c59968762ca92fe30045ec15a5c70193e9..7699424aff9f9dba6a474eebca12fde91038c844 100644 --- a/src/files.c +++ b/src/files.c @@ -581,23 +581,22 @@ void replace_marked_buffer(const char *filename, filestruct *top, size_t top_x, #endif /* !NANO_TINY */ #endif /* !DISABLE_SPELLER */ -/* Update the screen to account for the current buffer. */ -void display_buffer(void) +/* Update the titlebar and the multiline cache to match the current buffer. */ +void prepare_for_display(void) { /* Update the titlebar, since the filename may have changed. */ if (!inhelp) titlebar(NULL); #ifndef DISABLE_COLOR - have_palette = FALSE; - /* 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 + have_palette = FALSE; +#endif refresh_needed = TRUE; } @@ -629,8 +628,8 @@ void switch_to_prevnext_buffer(bool to_next) openfile->firstcolumn = 0; #endif - /* Update the screen to account for the current buffer. */ - display_buffer(); + /* Update titlebar and multiline info to match the current buffer. */ + prepare_for_display(); /* Indicate the switch on the statusbar. */ if (!inhelp) @@ -1190,7 +1189,7 @@ void do_insertfile(void) } #endif /* !DISABLE_HISTORIES */ /* Update stuff to account for the current buffer. */ - display_buffer(); + prepare_for_display(); } else #endif /* !DISABLE_MULTIBUFFER */ { diff --git a/src/help.c b/src/help.c index ba6cd2cb91cac763b442186b2b517ccb5109efa7..c39c0e6b27f46948e4170468a95a955218448b27 100644 --- a/src/help.c +++ b/src/help.c @@ -80,7 +80,7 @@ void display_the_help_text(bool redisplaying) open_buffer(tempfilename, FALSE); remove_magicline(); - display_buffer(); + prepare_for_display(); /* Move to the position in the file where we were before. */ while (TRUE) { diff --git a/src/nano.c b/src/nano.c index 155c057a4e6fa43cc5bdae22344cb9ac44192453..e1c6e69329c45e9a3603dc3e792682f51098cf29 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2624,10 +2624,10 @@ int main(int argc, char **argv) #endif #ifdef DEBUG - fprintf(stderr, "Main: show buffer contents, and enter main loop\n"); + fprintf(stderr, "Main: show title bar, and enter main loop\n"); #endif - display_buffer(); + prepare_for_display(); while (TRUE) { #ifdef ENABLE_LINENUMBERS diff --git a/src/proto.h b/src/proto.h index 57e180acf16a37902a785b019813358f86263fcf..a1cda31ddb3c7892f9ac4b785401b4374854047b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -267,7 +267,7 @@ void replace_marked_buffer(const char *filename, filestruct *top, size_t top_x, filestruct *bot, size_t bot_x); #endif #endif -void display_buffer(void); +void prepare_for_display(void); #ifndef DISABLE_MULTIBUFFER void switch_to_prev_buffer_void(void); void switch_to_next_buffer_void(void);