From 6b24856c2f6d8e9838e8b03c2ead9efa0dadd228 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sat, 7 Aug 2004 22:33:14 +0000 Subject: [PATCH] add titlebar() calls before all open_file() calls and remove the titlebar() call after them, so that the titlebar is displayed properly for all file(s) loaded; also add missing int -> bool conversion git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/nano.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7da8e00..4869071d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -149,6 +149,9 @@ CVS code - - Call setlocale() outside the ENABLE_NLS #ifdef, since UTF-8 support won't work properly if the locale isn't set, whether NLS is enabled or not. (Junichi Uekawa) + - Add titlebar() calls before all open_file() calls and remove + the titlebar() call after them, so that the titlebar is + displayed properly for all file(s) loaded. (DLR) - nano.h: - Reassign the key for full justification to Ctrl-U, for compatibility with the current version of Pico. (DLR) diff --git a/src/nano.c b/src/nano.c index 7834c7b6..2d02fa0f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -3472,18 +3472,20 @@ int main(int argc, char *argv[]) fprintf(stderr, "Main: open file\n"); #endif + titlebar(NULL); open_file(filename, FALSE, FALSE); #ifdef ENABLE_MULTIBUFFER /* If we're using multibuffers and more than one file is specified on the command line, load them all and switch to the first one afterward */ if (optind + 1 < argc) { - int old_multibuffer = ISSET(MULTIBUFFER); + bool old_multibuffer = ISSET(MULTIBUFFER); SET(MULTIBUFFER); for (optind++; optind < argc; optind++) { add_open_file(TRUE); new_file(); filename = mallocstrcpy(filename, argv[optind]); + titlebar(NULL); open_file(filename, FALSE, FALSE); load_file(FALSE); } @@ -3493,8 +3495,6 @@ int main(int argc, char *argv[]) } #endif - titlebar(NULL); - if (startline > 0) do_gotoline(startline, FALSE); -- 2.39.5