diff --git a/src/winio.c b/src/winio.c
index 3f43d0315f16f70da514777f5dff74f053c20d92..73fdcddf57e748bebb925eccf39e320fa976c5d7 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1928,6 +1928,10 @@ char *display_string(const char *buf, size_t start_col, size_t span,
     /* Null-terminate converted. */
     converted[index] = '\0';
 
+    /* If there is more text than can be shown, make room for the $. */
+    if (*buf != '\0' && isdata && !ISSET(SOFTWRAP))
+	span--;
+
     /* Make sure converted takes up no more than span columns. */
     index = actual_x(converted, span);
     null_at(&converted, index);