mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
fix bug with ctrl+d leaving the tty in an unknown state
This commit is contained in:
parent
e3a86643d2
commit
79db978349
3 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -982,6 +982,7 @@ Options:
|
|||
switch (str) {
|
||||
case String.fromCharCode(4):
|
||||
case 4:
|
||||
term.ttyctrl('raw',false);
|
||||
doShellExit(0);
|
||||
break;
|
||||
case '\t': // tab
|
||||
|
|
|
|||
|
|
@ -549,6 +549,8 @@ Options:
|
|||
return 1;
|
||||
}
|
||||
|
||||
term.ttyctrl('sane');
|
||||
|
||||
if (user != null) {
|
||||
setUser(user);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue