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-d3aeb78583b8master
parent
193b0e56f3
commit
7e62d109ba
|
@ -69,6 +69,10 @@ CVS code -
|
||||||
get_next_filename()
|
get_next_filename()
|
||||||
- Use an unsigned long instead of an int for the number
|
- Use an unsigned long instead of an int for the number
|
||||||
prepended to the filename. (DLR)
|
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()
|
write_file()
|
||||||
- Since lineswritten is a size_t, print its value as an unsigned
|
- Since lineswritten is a size_t, print its value as an unsigned
|
||||||
long instead of an unsigned int. (DLR)
|
long instead of an unsigned int. (DLR)
|
||||||
|
|
21
src/files.c
21
src/files.c
|
@ -569,7 +569,8 @@ void do_insertfile(
|
||||||
|
|
||||||
ans = mallocstrcpy(ans, answer);
|
ans = mallocstrcpy(ans, answer);
|
||||||
|
|
||||||
#if !defined(NANO_SMALL) && defined(ENABLE_MULTIBUFFER)
|
#ifndef NANO_SMALL
|
||||||
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
if (i == TOGGLE_MULTIBUFFER_KEY) {
|
if (i == TOGGLE_MULTIBUFFER_KEY) {
|
||||||
/* Don't allow toggling if we're in view mode. */
|
/* Don't allow toggling if we're in view mode. */
|
||||||
if (!ISSET(VIEW_MODE))
|
if (!ISSET(VIEW_MODE))
|
||||||
|
@ -578,6 +579,12 @@ void do_insertfile(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (i == NANO_TOOTHERINSERT_KEY) {
|
||||||
|
execute = !execute;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif /* !NANO_SMALL */
|
||||||
|
|
||||||
#ifndef DISABLE_BROWSER
|
#ifndef DISABLE_BROWSER
|
||||||
if (i == NANO_TOFILES_KEY) {
|
if (i == NANO_TOFILES_KEY) {
|
||||||
char *tmp = do_browse_from(answer);
|
char *tmp = do_browse_from(answer);
|
||||||
|
@ -588,19 +595,13 @@ void do_insertfile(
|
||||||
free(answer);
|
free(answer);
|
||||||
answer = tmp;
|
answer = tmp;
|
||||||
|
|
||||||
/* We have a file now. Get out of the statusbar prompt
|
/* We have a file now. Indicate this and get out of the
|
||||||
* cleanly. */
|
* statusbar prompt cleanly. */
|
||||||
|
i = 0;
|
||||||
statusq_abort();
|
statusq_abort();
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
/* If we don't have a file yet, go back to the statusbar
|
||||||
* prompt. */
|
* prompt. */
|
||||||
if (i != 0
|
if (i != 0
|
||||||
|
|
Loading…
Reference in New Issue