From 46464105f276580a8e6b269ddee47621130f9dff Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 3 May 2015 13:25:24 +0000
Subject: [PATCH] Displaying an ellipsis only when the filename is longer than
 the available space, not when it still fits.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5221 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog     | 4 ++++
 src/browser.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6ebe7031..5d486685 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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.
+
 2015-04-28  Benno Schulenberg  <bensberg@justemail.net>
 	* src/color.c (color_update): Match the file regex of a syntax against
 	the absolute, canonical path instead of against the path the user gave.
diff --git a/src/browser.c b/src/browser.c
index 47bac75b..b366edf9 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -573,7 +573,7 @@ void browser_refresh(void)
 		/* The maximum length of the file information in
 		 * columns: seven for "--", "(dir)", or the file size,
 		 * and 12 for "(parent dir)". */
-	bool dots = (COLS >= 15 && filetaillen >= longest - foomaxlen - 1);
+	bool dots = (COLS >= 15 && filetaillen >= longest - foomaxlen);
 		/* Do we put an ellipsis before the filename?  Don't set
 		 * this to TRUE if we have fewer than 15 columns (i.e.
 		 * one column for padding, plus seven columns for a
-- 
GitLab