Prevents deleting the last line when resizing.