Make prefix error system work properly.

This commit is contained in:
C. Guy Yarvin 2015-03-18 21:12:23 -07:00
parent 845f09beff
commit b5a4f6784a
2 changed files with 16 additions and 6 deletions

View File

@ -420,9 +420,7 @@
++ dy-edit :: handle edit
|= cal=console-change
^+ +>+>
=+ old=buf.say
=^ dat say (~(receive cs say) cal)
=. dat (~(inverse cs say(buf old)) dat)
=^ dat say (~(transceive cs say) cal)
?: |(?=(^ per) ?=(^ pux) ?=(~ pro))
~& %dy-edit-busy
=^ lic say (~(transmit cs say) dat)
@ -602,10 +600,14 @@
++ he-stir :: apply change
|= cal=console-change
^+ +>
=^ dut say (~(remit cs say) cal he-like)
?~ dut
=^ dat say (~(transceive cs say) cal)
?. ?& ?=(%del -.dat)
=(+(p.dat) (lent buf.say))
=(%| -:(he-dope (tufa buf.say)))
==
+>.$
(he-rush %mor [%det u.dut] [%bel ~] ~)
=^ lic say (~(transmit cs say) dat)
(he-rush %mor [%bel ~] [%det lic] ~)
::
++ he-plan :: execute command
|= mad=dojo-command

View File

@ -159,6 +159,7 @@
++ inverse :: relative inverse
|= ted=console-edit
^- console-edit
=. ted ?.(?=([%mor * ~] ted) ted i.p.ted)
?- -.ted
%del [%ins p.ted (snag p.ted buf)]
%ins [%del p.ted]
@ -177,6 +178,13 @@
^- [console-change console-share]
[[[his.ven own.ven] (sham buf) ted] (commit ted)]
::
++ transceive :: receive and invert
|= console-change
^- [console-edit console-share]
=+ old=buf
=^ dat +>+<.$ (receive +<.$)
[(inverse(buf old) dat) +>+<.$]
::
++ receive :: naturalize event
|= console-change
^- [console-edit console-share]