in do_insertfile(), set i to 0 when we get a filename via the file

browser, so that it's read in properly when we exit the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-06-06 19:25:29 +00:00
parent 193b0e56f3
commit 7e62d109ba
2 changed files with 15 additions and 10 deletions

View File

@ -69,6 +69,10 @@ CVS code -
get_next_filename()
- Use an unsigned long instead of an int for the number
prepended to the filename. (DLR)
do_insertfile()
- Set i to 0 when we get a filename via the file browser, so
that it's read in properly when we exit the file browser.
(DLR)
write_file()
- Since lineswritten is a size_t, print its value as an unsigned
long instead of an unsigned int. (DLR)

View File

@ -569,7 +569,8 @@ void do_insertfile(
ans = mallocstrcpy(ans, answer);
#if !defined(NANO_SMALL) && defined(ENABLE_MULTIBUFFER)
#ifndef NANO_SMALL
#ifdef ENABLE_MULTIBUFFER
if (i == TOGGLE_MULTIBUFFER_KEY) {
/* Don't allow toggling if we're in view mode. */
if (!ISSET(VIEW_MODE))
@ -578,6 +579,12 @@ void do_insertfile(
}
#endif
if (i == NANO_TOOTHERINSERT_KEY) {
execute = !execute;
continue;
}
#endif /* !NANO_SMALL */
#ifndef DISABLE_BROWSER
if (i == NANO_TOFILES_KEY) {
char *tmp = do_browse_from(answer);
@ -588,19 +595,13 @@ void do_insertfile(
free(answer);
answer = tmp;
/* We have a file now. Get out of the statusbar prompt
* cleanly. */
/* We have a file now. Indicate this and get out of the
* statusbar prompt cleanly. */
i = 0;
statusq_abort();
}
#endif
#ifndef NANO_SMALL
if (i == NANO_TOOTHERINSERT_KEY) {
execute = !execute;
continue;
}
#endif
/* If we don't have a file yet, go back to the statusbar
* prompt. */
if (i != 0