Commit 69a28122 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 15 additions and 7 deletions
+15 -7
......@@ -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)
......
......@@ -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)
......
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