diff --git a/src/winio.c b/src/winio.c
index cbe16d88c743b04fec95a1db7b2bd658cf3dd7d5..4285c9be948d4f93cad9a4af024c23bb338409f3 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2923,7 +2923,7 @@ void edit_scroll(scroll_dir direction, int nrows)
 	/* If the first blank row is in the middle of a softwrapped line,
 	 * compensate for the earlier onscreen chunks of that line. */
 	if (ISSET(SOFTWRAP) && i == nrows && line != openfile->edittop)
-	    i += strnlenpt(line->data, leftedge) / editwincols;
+	    i += leftedge / editwincols;
 #endif
 	i -= update_line(line, (line == openfile->current) ?
 				openfile->current_x : 0);