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)
+ displayed properly for all file(s) loaded. Also call
+ display_main_list() after adding the first file to open_files,
+ so that "Close" is properly displayed then instead of "Exit".
+ (DLR)
- nano.h:
- Reassign the key for full justification to Ctrl-U, for
compatibility with the current version of Pico. (DLR)
#endif
#ifdef DEBUG
- fprintf(stderr, "Main: bottom win\n");
+ fprintf(stderr, "Main: top and bottom win\n");
#endif
- /* Set up bottom of window */
+ titlebar(NULL);
display_main_list();
#ifdef DEBUG
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 */
+ afterward. */
if (optind + 1 < argc) {
- bool old_multibuffer = ISSET(MULTIBUFFER);
+ bool old_multibuffer = ISSET(MULTIBUFFER), list = FALSE;
SET(MULTIBUFFER);
for (optind++; optind < argc; optind++) {
add_open_file(TRUE);
titlebar(NULL);
open_file(filename, FALSE, FALSE);
load_file(FALSE);
+ /* Display the main list with "Close" if we haven't
+ * already. */
+ if (!list) {
+ shortcut_init(FALSE);
+ list = TRUE;
+ display_main_list();
+ }
}
open_nextfile_void();
if (!old_multibuffer)