mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
add tab support to tty
This commit is contained in:
parent
5da5e60b44
commit
717cf09ba2
1 changed files with 13 additions and 0 deletions
|
|
@ -2983,6 +2983,19 @@ clite.tty = {
|
|||
case 8:
|
||||
clite.tty.internal.write(id,String.fromCharCode(8));
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
var cr = clite.tty.getCursor(id);
|
||||
if (Array.isArray(cr)) {
|
||||
var m = 4-(cr[0]%4);
|
||||
for (var j=0; j<m; j++) {
|
||||
clite.tty.internal.write(id,' ');
|
||||
}
|
||||
}else{
|
||||
clite.tty.internal.write(id,'^');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: // NL/LF to CR+LF
|
||||
clite.tty.internal.write(id,String.fromCharCode(13));
|
||||
clite.tty.internal.write(id,String.fromCharCode(10));
|
||||
|
|
|
|||
Loading…
Reference in a new issue