improve the dumb terminal support and fix some bugs related to the support.
5 files changed