wait until the line ends

instead of defined number of ticks