update textbuffer if the user changes view