handle if the newValue.length is less than the old value by deleting
handle if the newValue.length is less than the old value by deleting

Tyriar/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,Tyriar/xterm.js