about summary refs log tree commit diff stats
path: root/src/GridText.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/GridText.c')
-rw-r--r--src/GridText.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/GridText.c b/src/GridText.c
index 3e6e329b..e1d2c335 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1726,8 +1726,15 @@ static void display_title(HText *text)
 #endif /* USE_COLOR_STYLE */
 #ifdef WIDEC_CURSES
     i = limit - LYbarWidth - strlen(percent) - LYstrCells(title);
-    if (i <= 0)
+    if (i <= 0) {		/* title is truncated */
+	i = limit - LYbarWidth - strlen(percent) - 3;
+	if (i <= 0) {		/* no room at all */
+	    title[0] = '\0';
+	} else {
+	    strcpy(title + LYstrExtent2(title, i), "...");
+	}
 	i = 0;
+    }
     LYmove(0, i);
 #else
     i = (limit - 1) - strlen(percent) - strlen(title);