tty.js
tty.js copied to clipboard
Resizing Terminal Destroys Rendered Data
Issue
Changing either column or row dimensions in the terminal, after data has been rendered, results in data loss.
Example:
Columns:
Prompt at 24x80:
[root@Development-Server ~]#
[root@Development-Server ~]#
[root@Development-Server ~]#
[root@Development-Server ~]#
Prompt after resize to 24x16 and then resize back to 24x80:
[root@Developmen
[root@Developmen
[root@Developmen
[root@Developmen
Rows:
Prompt at 24x80:
[root@Development-Server ~]# 1
bash: 1: command not found
[root@Development-Server ~]# 2
bash: 2: command not found
[root@Development-Server ~]# 3
bash: 3: command not found
[root@Development-Server ~]# 4
bash: 4: command not found
[root@Development-Server ~]# 5
bash: 5: command not found
...
Prompt after resize to 4x80 and then resize back to 24x80:
[root@Development-Server ~]# 1
bash: 1: command not found
[root@Development-Server ~]# 2
[root@Development-Server ~]#
...
Both Columns and Rows:
Prompt at 24x80:
[root@Development-Server ~]# 1
bash: 1: command not found
[root@Development-Server ~]# 2
bash: 2: command not found
[root@Development-Server ~]# 3
bash: 3: command not found
[root@Development-Server ~]# 4
bash: 4: command not found
[root@Development-Server ~]# 5
bash: 5: command not found
...
Prompt after resize to 7x22 and then resize back to 24x80:
bash: 1: command not f
[root@Development-Serv
bash: 2: command not f
[root@Development-Serv
bash: 3: command not f
[root@Development-Serv
[root@Development-Server ~]#
...
Possibly related - #99 is a problem again/still - resizing the terminal results in broken output.
EDIT: not resizing, but viewing a file with 'less' results in mangled output. Reset doesn't seem to resolve.