diff --git a/src/files.c b/src/files.c
index 31f754c0202bcaa25e000f158661eda406408a9b..6e0963460ccd5abc77907450d133c2d2a4b20cf8 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1066,7 +1066,10 @@ void do_insertfile(void)
 #endif
 		MINSERTFILE, given,
 #ifndef DISABLE_HISTORIES
-		execute ? &execute_history : NULL,
+#ifndef NANO_TINY
+		execute ? &execute_history :
+#endif
+		NULL,
 #endif
 		edit_refresh, msg,
 #ifndef DISABLE_OPERATINGDIR