commit 816a165b4b8b0d8545c4950542bcdeb25c097ec9
parent 150469a6467c7db615ac0999b042ffd5b7f62239
Author: Chris Allegretta <chrisa@asty.org>
Date: Sat, 6 Jan 2001 17:43:56 +0000
Fixes for dir crash by rocco and exit called on insert file
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -20,6 +20,11 @@ General -
- removed skipping . and .. when tabulating matches.
- Added the (char *) sizeof when allocating memory for the filename
array (Rocco).
+ do_browser()
+ - Don't decrement longest by the length of path. Fixes crashes
+ on entering various dirs (Rocco).
+ - Don't ungetch() the exit key, unneeded, fixes inerting a file
+ causes exit code.
- nano.c:
main()
- Reorder the getopt options to be more or less alphabetical
diff --git a/files.c b/files.c
@@ -1131,8 +1131,6 @@ char **browser_init(char *path, int *longest, int *numents)
i++;
}
- longest -= strlen(path);
-
if (*longest > COLS - 1)
*longest = COLS - 1;
@@ -1323,9 +1321,6 @@ char *do_browser(char *inpath)
/* Start over again with the new path value */
return do_browser(path);
} else {
-
- /* Work around for duplicating code */
- ungetch(NANO_EXIT_KEY);
retval = path;
abort = 1;
}