Fix for folded / soft wrapped lines.

With this it works properly for soft wrapped lines and folded rows. Screen lines needed to be referenced throughout.