count line numbers correctly, handle the VIEWPORT change so it only ever has one...