fix bug with ctrl+d leaving the tty in an unknown state

This commit is contained in:
Lisa Milne 2023-12-17 17:40:27 +10:00
parent e3a86643d2
commit 79db978349
3 changed files with 8 additions and 0 deletions

View file

@ -2815,6 +2815,11 @@ clite.tty = {
case 'rows':
return t.data.length;
break;
case 'sane':
t.raw = false;
t.echo = true;
return true;
break;
default:
return false;
}

View file

@ -982,6 +982,7 @@ Options:
switch (str) {
case String.fromCharCode(4):
case 4:
term.ttyctrl('raw',false);
doShellExit(0);
break;
case '\t': // tab

View file

@ -549,6 +549,8 @@ Options:
return 1;
}
term.ttyctrl('sane');
if (user != null) {
setUser(user);
return null;