diff --git a/ChangeLog b/ChangeLog
index 30402b444f771a67fa263f198afe72983efe7c3f..67b3665f5f46fc4843d49763b35218a7a7b19d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-08  Benno Schulenberg  <bensberg@justemail.net>
+	* src/browser.c (browser_refresh): Take the distant possibility of
+	terabyte files into account, and in the bargain get rid of the need
+	to calculate the number of digits in UINT_MAX.
+
 2015-05-03  Benno Schulenberg  <bensberg@justemail.net>
 	* src/browser.c (browser_refresh): Display an ellipsis only when the
 	filename is longer than the available space, not when it still fits.
diff --git a/src/browser.c b/src/browser.c
index 2a5e764dfe8d72485d77cdab385540aa7da39f78..5cfc45a4cf335038f46cc5172df4bb868cafe8b2 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -541,16 +541,12 @@ functionptrtype parse_browser_input(int *kbinput)
  * necessary, and display the list of files. */
 void browser_refresh(void)
 {
-    static int uimax_digits = -1;
     size_t i;
     int line = 0, col = 0;
 	/* The current line and column while the list is getting displayed. */
     char *foo;
 	/* The additional information that we'll display about a file. */
 
-    if (uimax_digits == -1)
-	uimax_digits = digits(UINT_MAX);
-
     blank_edit();
 
     wmove(edit, 0, 0);
@@ -621,26 +617,29 @@ void browser_refresh(void)
 	    unsigned long result = st.st_size;
 	    char modifier;
 
-	    foo = charalloc(uimax_digits + 4);
+	    foo = charalloc(foomaxlen + 1);
 
-	    /* Bytes. */
 	    if (st.st_size < (1 << 10))
-		modifier = ' ';
-	    /* Kilobytes. */
+		modifier = ' ';  /* bytes */
 	    else if (st.st_size < (1 << 20)) {
 		result >>= 10;
-		modifier = 'K';
-	    /* Megabytes. */
+		modifier = 'K';  /* kilobytes */
 	    } else if (st.st_size < (1 << 30)) {
 		result >>= 20;
-		modifier = 'M';
-	    /* Gigabytes. */
+		modifier = 'M';  /* megabytes */
 	    } else {
 		result >>= 30;
-		modifier = 'G';
+		modifier = 'G';  /* gigabytes */
 	    }
 
-	    sprintf(foo, "%4lu %cB", result, modifier);
+	    /* If less than a terabyte, or if numbers can't even go
+	     * that high, show the size, otherwise show "(huge)". */
+	    if (st.st_size < (1 << 40) || (1 << 40) == 0)
+		sprintf(foo, "%4lu %cB", result, modifier);
+	    else
+		/* TRANSLATORS: Try to keep this at most 7 characters.
+		 * If necessary, you can leave out the parentheses. */
+		foo = mallocstrcpy(foo, _("(huge)"));
 	}
 
 	/* Make sure foo takes up no more than foomaxlen columns. */