From 816a165b4b8b0d8545c4950542bcdeb25c097ec9 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 6 Jan 2001 17:43:56 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ files.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec7c3e3d..c8e32df6 100644 --- 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 index facd2dcb..99ce38e8 100644 --- 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; } -- 2.39.5