GUAC-621: Only increase buffer length if real character data was written (not cleared).
GUAC-621: During resize, keep cursor on screen and redraw cursor if necessary.