make sure that the shortcut list properly displays "Close" when reading

in multiple files on the command line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2004-08-12 04:34:00 +00:00
parent 76356bd05b
commit 69a28122c1
2 changed files with 15 additions and 7 deletions

View File

@ -163,7 +163,10 @@ CVS code -
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)

View File

@ -3459,23 +3459,21 @@ int main(int argc, char *argv[])
#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);
@ -3484,6 +3482,13 @@ int main(int argc, char *argv[])
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)