"Magnus Hagander" <mha@sollentuna.net> writes:
> Attached patch solves the problem for me.Didn't see anything of the
> problem you described about hangs in my implementation. Probably because
> mine exits at the first sign of a linebreak.
Applied with some trivial legibility improvements.
regards, tom lane