]> git.wh0rd.org Git - nano.git/commitdiff
still more breakage fixes
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 12 Jul 2005 23:06:22 +0000 (23:06 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 12 Jul 2005 23:06:22 +0000 (23:06 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c
src/nano.c
src/proto.h

index f9e744816a71a8da0e002490f8bbef3277e17dae..c035bb969bb0d1c5a2f641f258c19a9ff6c9a9f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,9 +15,9 @@ CVS code -
          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()
index 1013cd1fab3ce1d33d759033d6e65ed6b9717fc7..c99fcfc604b812f1337c12431ebac49c05569095 100644 (file)
@@ -215,15 +215,20 @@ void open_buffer(const char *filename)
      * 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();
 }
 
@@ -250,7 +255,7 @@ void switch_to_prevnext_buffer(bool next_buf)
 #endif
 
     /* Update the screen to account for the current buffer. */
-    load_buffer();
+    display_buffer();
 
     /* Indicate the switch on the statusbar. */
     statusbar(_("Switched to %s"),
@@ -794,7 +799,7 @@ void do_insertfile(
            if (ISSET(MULTIBUFFER))
                /* Update the screen to account for the current
                 * buffer. */
-               load_buffer();
+               display_buffer();
            else
 #endif
            {
index c2e312923e800a3a8ba16aca91277241757fdf4c..3bb685c50b504aeeedf12b7d97822970c88076b2 100644 (file)
@@ -4714,17 +4714,12 @@ int main(int argc, char **argv)
 
     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;
index 189c20ac7049593c6a23fd71415e96b6a0ddfe3a..2262f1ad360829afb5597bbdc35e3dba1c6404a1 100644 (file)
@@ -243,7 +243,7 @@ void initialize_buffer(void);
 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);