- 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)
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);
}
}
#endif
- titlebar(NULL);
-
if (startline > 0)
do_gotoline(startline, FALSE);