Accordingly, remove the globals. Changes to pretty much
every function. Rename global_init() window_size_init(),
rename add_open_file() make_new_buffer(), rename load_buffer()
- open_buffer(), rename load_open_file() load_buffer(), rename
- open_prevnext_file() switch_to_prevnext_buffer(), rename
- open_prevfile_void() switch_to_prev_buffer(), rename
+ open_buffer(), rename load_open_file() display_buffer(),
+ rename open_prevnext_file() switch_to_prevnext_buffer(),
+ rename open_prevfile_void() switch_to_prev_buffer(), rename
open_nextfile_void() switch_to_next_buffer(), rename
write_marked() write_marked_file(), remove load_file(), rename
cancel_fork() cancel_command(), rename open_pipe()
* to the first line of the buffer. */
if (rc != -1 && new_buffer)
openfile->current = openfile->fileage;
+
+#ifdef ENABLE_COLOR
+ /* If we're loading into a new buffer, update the buffer's
+ * associated colors, if applicable. */
+ if (new_buffer)
+ update_color();
+#endif
+
}
/* Update the screen to account for the current buffer. */
-void load_buffer(void)
+void display_buffer(void)
{
titlebar(NULL);
-#ifdef ENABLE_COLOR
- update_color();
-#endif
edit_refresh();
}
#endif
/* Update the screen to account for the current buffer. */
- load_buffer();
+ display_buffer();
/* Indicate the switch on the statusbar. */
statusbar(_("Switched to %s"),
if (ISSET(MULTIBUFFER))
/* Update the screen to account for the current
* buffer. */
- load_buffer();
+ display_buffer();
else
#endif
{
display_main_list();
- titlebar(NULL);
-#ifdef ENABLE_COLOR
- update_color();
-#endif
-
#ifndef NANO_SMALL
/* Return here after a SIGWINCH. */
sigsetjmp(jmpbuf, 1);
#endif
- edit_refresh();
+ display_buffer();
while (TRUE) {
bool meta_key, func_key, s_or_t, ran_func, finished;
void reinitialize_buffer(void);
#endif
void open_buffer(const char *filename);
-void load_buffer(void);
+void display_buffer(void);
#ifdef ENABLE_MULTIBUFFER
void switch_to_prevnext_buffer(bool next);
void switch_to_prev_buffer_void(void);