diff --git a/src/nano.c b/src/nano.c
index 1063e9b148d2efab370b18c16f406bedd636fc6c..e8bd5bad64fff7278913eb14d481ef2d80734ffb 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1812,16 +1812,13 @@ int do_mouse(void)
  * TRUE. */
 void do_output(char *output, size_t output_len, bool allow_cntrls)
 {
-    size_t current_len, i = 0;
-#ifndef NANO_TINY
-    size_t orig_rows = 0, original_row = 0;
-#endif
     char *char_buf = charalloc(mb_cur_max());
     int char_len;
-
-    current_len = strlen(openfile->current->data);
-
+    size_t current_len = strlen(openfile->current->data);
+    size_t i = 0;
 #ifndef NANO_TINY
+    size_t orig_rows = 0, original_row = 0;
+
     if (ISSET(SOFTWRAP)) {
 	if (openfile->current_y == editwinrows - 1)
 	    original_row = xplustabs() / editwincols;
@@ -1850,8 +1847,6 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
 		refresh_needed = TRUE;
 	}
 
-	assert(openfile->current_x <= current_len);
-
 	/* Make room for the new character and copy it into the line. */
 	openfile->current->data = charealloc(openfile->current->data,
 					current_len + char_len + 1);