Commit 6b24856c authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
parent c7b6ac5a
Showing with 6 additions and 3 deletions
+6 -3
...@@ -149,6 +149,9 @@ CVS code - ...@@ -149,6 +149,9 @@ CVS code -
- Call setlocale() outside the ENABLE_NLS #ifdef, since UTF-8 - Call setlocale() outside the ENABLE_NLS #ifdef, since UTF-8
support won't work properly if the locale isn't set, whether support won't work properly if the locale isn't set, whether
NLS is enabled or not. (Junichi Uekawa) 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: - nano.h:
- Reassign the key for full justification to Ctrl-U, for - Reassign the key for full justification to Ctrl-U, for
compatibility with the current version of Pico. (DLR) compatibility with the current version of Pico. (DLR)
......
...@@ -3472,18 +3472,20 @@ int main(int argc, char *argv[]) ...@@ -3472,18 +3472,20 @@ int main(int argc, char *argv[])
fprintf(stderr, "Main: open file\n"); fprintf(stderr, "Main: open file\n");
#endif #endif
titlebar(NULL);
open_file(filename, FALSE, FALSE); open_file(filename, FALSE, FALSE);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
/* If we're using multibuffers and more than one file is specified /* 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 on the command line, load them all and switch to the first one
afterward */ afterward */
if (optind + 1 < argc) { if (optind + 1 < argc) {
int old_multibuffer = ISSET(MULTIBUFFER); bool old_multibuffer = ISSET(MULTIBUFFER);
SET(MULTIBUFFER); SET(MULTIBUFFER);
for (optind++; optind < argc; optind++) { for (optind++; optind < argc; optind++) {
add_open_file(TRUE); add_open_file(TRUE);
new_file(); new_file();
filename = mallocstrcpy(filename, argv[optind]); filename = mallocstrcpy(filename, argv[optind]);
titlebar(NULL);
open_file(filename, FALSE, FALSE); open_file(filename, FALSE, FALSE);
load_file(FALSE); load_file(FALSE);
} }
...@@ -3493,8 +3495,6 @@ int main(int argc, char *argv[]) ...@@ -3493,8 +3495,6 @@ int main(int argc, char *argv[])
} }
#endif #endif
titlebar(NULL);
if (startline > 0) if (startline > 0)
do_gotoline(startline, FALSE); do_gotoline(startline, FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment