diff --git a/src/winio.c b/src/winio.c
index edbff969774edf954de8dad523c554fe37b70a92..16aec48f313dd348d67b92664ea142a34c3df990 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3100,10 +3100,11 @@ void disable_nodelay(void)
  * expect word to have tabs and control characters expanded. */
 void spotlight(bool active, const char *word)
 {
-    size_t word_len = strlenpt(word), room;
+    size_t word_len = strlenpt(word), room = word_len;
 
     /* Compute the number of columns that are available for the word. */
-    room = editwincols + get_page_start(xplustabs()) - xplustabs();
+    if (!ISSET(SOFTWRAP))
+	room = editwincols + get_page_start(xplustabs()) - xplustabs();
 
     assert(room > 0);