Attached is a patch that fixes virtual terminal problems when backspace is used on wrapped lines (see patch text for the specific issues). The issues can be demonstrated by trying two things in the console (vt): #1 1) issue the "cat" command 2) type characters until you have wrapped cursor to next line 3) hit backspace (nothing happens visually, but char(s) are erased in buf, as seen when enter is hit and line is printed to display) #2 1) issue the "cat" command 2) type characters until you are at the very end of the line (cursor now on last char - i.e. in "need_wrap" state) 3) hit backspace (it moves back and visually erases 2nd to last char, but hitting enter shows that last char was actually erased in buffer) -Joe