Detection means for controlling lateral position of the textile material