add a feature for the terminal emulator
merge from master