Updated code which adds blank space

Now restricted to adding spaces after lines which are visible in the
current view if it is filtered