From 664e0da48e24d8c083d114e424a963bef56b1b7d Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 7 Jul 2006 16:12:24 +0000 Subject: [PATCH] still more cosmetic fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/browser.c | 5 +++-- src/winio.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/browser.c b/src/browser.c index a700056a..9360f7dd 100644 --- a/src/browser.c +++ b/src/browser.c @@ -616,10 +616,11 @@ void browser_refresh(void) /* The maximum length of the file information in * columns: 7 for "--", "(dir)", or the file size, and * 12 for "(parent dir)". */ - bool dots = (COLS >= 15 && filetaillen > longest - + bool dots = (COLS >= 15 && filetaillen >= longest - foomaxlen - 1); /* Do we put an ellipsis before the filename? Don't set - * this to TRUE if we have fewer than 15 columns. */ + * this to TRUE if we have fewer than 15 columns (i.e, 7 + * columns for a filename other than ".."). */ char *disp = display_string(filetail, dots ? filetaillen - longest + foomaxlen + 4 : 0, longest, FALSE); /* If we put an ellipsis before the filename, reserve 1 diff --git a/src/winio.c b/src/winio.c index 9fe6934c..72a1a60c 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2051,8 +2051,9 @@ void titlebar(const char *path) if (!newfie) { size_t lenpt = strlenpt(path), start_col; - /* Don't set dots to TRUE if we have fewer than 8 columns. */ - dots = (space >= 8 && lenpt >= space); + /* Don't set dots to TRUE if we have fewer than 7 columns for + * a filename. */ + dots = (space >= 7 && lenpt >= space); if (dots) { start_col = lenpt - space + 3;