mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 11:40:11 +03:00
soto: amend tab sole-effect json and handler
The behaviour of $tab sole-effects lacked a 'tab' key, so Soto wasn't catching or writing them to the screen. This commit amends both the handler and the sole-effect to fix that behaviour.
This commit is contained in:
parent
fad9fcb16b
commit
be4b479660
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -53,6 +53,7 @@
|
||||
:- %a
|
||||
%+ turn p.sef
|
||||
|= [=cord =^tank]
|
||||
%+ frond %tab
|
||||
%- pairs
|
||||
:~ match+s+cord
|
||||
info+(tape ~(ram re tank))
|
||||
|
@ -68,6 +68,7 @@
|
||||
:- %a
|
||||
%+ turn p.sef
|
||||
|= [=cord =^tank]
|
||||
%+ frond %tab
|
||||
%- pairs
|
||||
:~ match+s+cord
|
||||
info+(tape ~(ram re tank))
|
||||
|
@ -26,33 +26,30 @@ export class Store {
|
||||
if (dojoReply.map) {
|
||||
return dojoReply.map(reply => this.handleEvent(reply));
|
||||
}
|
||||
|
||||
switch(Object.keys(dojoReply)[0]) {
|
||||
case 'txt':
|
||||
return this.print(dojoReply.txt);
|
||||
return this.print(dojoReply.txt);
|
||||
case 'tab':
|
||||
for (let suggestion of dojoReply.tab) {
|
||||
let match = suggestion.match;
|
||||
let info = suggestion.info;
|
||||
this.print(match + " " + info);
|
||||
}
|
||||
return;
|
||||
this.print(dojoReply.tab.match + " " + dojoReply.tab.info);
|
||||
return;
|
||||
case 'tan':
|
||||
return dojoReply.tan.split("\n").map(this.print);
|
||||
return dojoReply.tan.split("\n").map(this.print);
|
||||
case 'pro':
|
||||
return this.setState({ prompt: dojoReply.pro.cad });
|
||||
return this.setState({ prompt: dojoReply.pro.cad });
|
||||
case 'hop':
|
||||
return this.setState({ cursor: dojoReply.hop });
|
||||
return this.setState({ cursor: dojoReply.hop });
|
||||
case 'det':
|
||||
buffer.receive(dojoReply.det);
|
||||
return this.sync(dojoReply.det.ted);
|
||||
buffer.receive(dojoReply.det);
|
||||
return this.sync(dojoReply.det.ted);
|
||||
case 'act':
|
||||
switch(dojoReply.act) {
|
||||
case 'clr': return this.setState({txt: []});
|
||||
case 'nex': return this.setState({
|
||||
input: "",
|
||||
cursor: 0
|
||||
});
|
||||
} break;
|
||||
switch(dojoReply.act) {
|
||||
case 'clr': return this.setState({txt: []});
|
||||
case 'nex': return this.setState({
|
||||
input: "",
|
||||
cursor: 0
|
||||
});
|
||||
} break;
|
||||
default: console.log(dojoReply);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user