diff --git a/ChangeLog b/ChangeLog
index 3af2dd5df693a03a762ab75bf96bdad973d47145..96a121f5d5a7abe5588637af85a1a33451e0a8f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,9 @@ CVS code -
 	- Assert that filename isn't NULL, and don't do anything special
 	  if it's blank, as the the former case shouldn't occur, and the
 	  latter case is now handled elsewhere. (DLR)
+  input_tab()
+	- Make columns an int instead of a size_t, since it's limited by
+	  COLS. (DLR)
 - global.c:
   shortcut_init()
 	- Simplify wording of nano_gotoline_msg. (Jordi and Ken Tyler)
diff --git a/src/files.c b/src/files.c
index 457c9e7cb62d642e4b1fbcc9709c19a4350b8ad6..474b6acb49eb7c236cfe16fcb617833735042d3e 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2119,8 +2119,8 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
 
 	while (TRUE) {
 	    for (match = 1; match < num_matches; match++) {
-		/* Get the number of single-byte characters that match1
-		 * and match2 have in common. */
+		/* Get the number of single-byte characters that all the
+		 * matches have in common. */
 		match1_mb_len = parse_mbchar(matches[0] + common_len,
 			match1_mb, NULL, NULL);
 		match2_mb_len = parse_mbchar(matches[match] +
@@ -2161,7 +2161,7 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
 	    beep();
 
 	/* If there is more of a match to display on the statusbar, show
-	 * it.  We reset lastwastab to FALSE: it requires hitting Tab
+	 * it.  We reset lastwastab to FALSE: it requires pressing Tab
 	 * twice in succession with no statusbar changes to see a match
 	 * list. */
 	if (common_len != *place) {
@@ -2176,8 +2176,7 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
 	} else if (*lastwastab == FALSE || num_matches < 2)
 	    *lastwastab = TRUE;
 	else {
-	    int longest_name = 0, editline = 0;
-	    size_t columns;
+	    int longest_name = 0, columns, editline = 0;
 
 	    /* Now we show a list of the available choices. */
 	    assert(num_matches > 1);
@@ -2199,9 +2198,9 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
 
 	    assert(longest_name <= COLS - 1);
 
-	    /* Each column will be longest_name + 2 characters wide,
-	     * i.e, two spaces between columns, except that there will
-	     * be only one space after the last column. */
+	    /* Each column will be (longest_name + 2) columns wide, i.e,
+	     * two spaces between columns, except that there will be
+	     * only one space after the last column. */
 	    columns = (COLS + 1) / (longest_name + 2);
 
 	    /* Blank the edit window, and print the matches out