diff --git a/src/screen.c b/src/screen.c
index 473e4fa..8b36bea 100644
--- a/screen.c
+++ b/screen.c
@@ -2271,8 +2271,8 @@ int padlen;
 	  while (i-- > 0)
 	    *pn-- = ' ';
 	  numpad--;
-	  if (r && p - buf == winmsg_rendpos[r - 1])
-	    winmsg_rendpos[--r] = pn - buf;
+	  if (r && p - buf + 1== winmsg_rendpos[r - 1])
+	    winmsg_rendpos[--r] = pn - buf + 1;
 	}
     }
   return pn2;

