implement append line
make the case of a single line in the buffer behave properly