in do_insertfile(), if file browsing succeeds, copy the filename we

browsed to into ans, put back Enter, and show the prompt one last time
so that it's exited properly and the cursor position at the statusbar is
reset


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey
2004-10-05 02:46:24 +00:00
parent 4dd723a095
commit b49daec3f2
2 changed files with 11 additions and 4 deletions

View File

@@ -558,10 +558,13 @@ void do_insertfile(
if (i == NANO_TOFILES_KEY) {
char *tmp = do_browse_from(answer);
if (tmp == NULL)
goto start_again;
free(answer);
answer = tmp;
if (tmp != NULL) {
free(answer);
answer = tmp;
ans = mallocstrcpy(ans, answer);
unget_kbinput(NANO_ENTER_KEY, FALSE);
}
goto start_again;
}
#endif