From 1dcf36a370cd79edc18da983ea6e39160c35c866 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sun, 23 May 2004 21:17:56 +0000
Subject: [PATCH] add missing bit

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/winio.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index d5a4879c..65da05a6 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1621,10 +1621,7 @@ void titlebar(const char *path)
 
     if (path == NULL)
 	path = filename;
-    if (space > prefixlen + statelen)
-	space -= prefixlen + statelen;
-    else
-	space = 0;
+    space -= prefixlen + statelen;
 	/* space is now the room we have for the file name. */
     if (!newbuffer) {
 	size_t lenpt = strlenpt(path), start_col;
@@ -1650,7 +1647,7 @@ void titlebar(const char *path)
     } else {
 	/* We will say something like "File: ...ename". */
 	waddnstr(topwin, prefix, prefixlen);
-	if (space == 0 || newbuffer)
+	if (space <= 0 || newbuffer)
 	    goto the_end;
 	waddch(topwin, ' ');
 	waddnstr(topwin, "...", space);
-- 
GitLab