the "Insert File" prompt would always result in the current answer's
being used as the filename afterward
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2443
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
builds with DEBUG defined again. (Mike Frysinger, found by
Dmitri Vassilenko)
- files.c:
+ do_insertfile()
+ - Fix problem where going into the help browser at the "Insert
+ File" prompt would always result in the current answer's being
+ used as the filename afterward. (DLR)
get_full_path()
- Rework handling of the results of getcwd() in order to avoid
segfaults if they fail, and to remove uses of the nonportable
#ifdef ENABLE_MULTIBUFFER
&& !ISSET(MULTIBUFFER)
#endif
- ))
- {
+ )) {
statusbar(_("Cancelled"));
break;
} else {
if (tmp == NULL)
continue;
+
free(answer);
answer = tmp;
}
#endif
+ /* If we don't have a file yet, go back to the statusbar
+ * prompt. */
+ if (i != 0)
+ continue;
+
#ifdef ENABLE_MULTIBUFFER
if (!ISSET(MULTIBUFFER)) {
#endif