diff --git a/src/ring.c b/src/ring.c
index ba160bf..f36124d 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -977,6 +977,7 @@ _vte_ring_rewrap (VteRing *ring,
 	ring->start = 0;
 	if (ring->end > ring->max)
 		ring->start = ring->end - ring->max;
+	ring->cached_row_num = (gulong) -1;
 
 	/* Find the markers. This requires that the ring is already updated. */
 	for (i = 0; i < num_markers; i++) {
