TextView: fix cols when appending to a buffer
If appending to a buffer through writer for example, the cols may not be
correct if the writes don't end up in a newline (\n). Fix this by
keeping track of the cols of previous append.
authored by