mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
make libterm use the actuall ctty id
This commit is contained in:
parent
4e36e1749f
commit
5da5e60b44
2 changed files with 6 additions and 6 deletions
|
|
@ -187,6 +187,9 @@ var bios = {
|
|||
if (ind < 0)
|
||||
return null;
|
||||
return window.localStorage.getItem(fn).toString();
|
||||
},
|
||||
clear:function() {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
},
|
||||
init:function() {
|
||||
|
|
|
|||
|
|
@ -2,19 +2,16 @@ clite.libs.data = function() {
|
|||
|
||||
clite.libs.load('libterm','term',function(io,env) {
|
||||
|
||||
// TODO: get the controlling tty id
|
||||
|
||||
return Object.create({
|
||||
|
||||
ctty:clite.proc.getTTY(io.pid),
|
||||
// clears the terminal
|
||||
clear:function() {
|
||||
var ctty = 0;
|
||||
clite.tty.clear(ctty);
|
||||
clite.tty.clear(this.ctty);
|
||||
},
|
||||
|
||||
ttyctrl:function(fn,v) {
|
||||
var ctty = 0;
|
||||
return clite.tty.ttyctrl(ctty,fn,v);
|
||||
return clite.tty.ttyctrl(this.ctty,fn,v);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue