fixed bug in scrollback

there was an issue in scrollback because it couldn't recognize there is
need to update the text in some cases, such as Switch(xx)