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)
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))
}
#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);
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