mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 22:55:03 +03:00
refactors ++ta-vew in drum
This commit is contained in:
parent
ddfc0f1cb2
commit
4b7d33335f
@ -824,27 +824,18 @@
|
||||
::
|
||||
++ ta-vew :: computed prompt
|
||||
|- ^- (pair @ud (list @c))
|
||||
?^ ris
|
||||
%= $
|
||||
ris ~
|
||||
cad.pom
|
||||
:(welp "(reverse-i-search)'" (tufa str.u.ris) "': ")
|
||||
==
|
||||
=- [(add pos.inp (lent p.vew)) (weld (tuba p.vew) q.vew)]
|
||||
^= vew ^- (pair tape (list @c))
|
||||
?: vis.pom [cad.pom buf.say.inp]
|
||||
:- ;: welp
|
||||
cad.pom
|
||||
?~ buf.say.inp ~
|
||||
;: welp
|
||||
"<"
|
||||
(scow %p (end 4 1 (sham buf.say.inp)))
|
||||
"> "
|
||||
==
|
||||
==
|
||||
=+ len=(lent buf.say.inp)
|
||||
|- ^- (list @c)
|
||||
?:(=(0 len) ~ [`@c`'*' $(len (dec len))])
|
||||
=; vew/(pair (list @c) tape)
|
||||
[(add pos.inp (lent q.vew)) (weld (tuba q.vew) p.vew)]
|
||||
?: vis.pom
|
||||
:- buf.say.inp :: default prompt
|
||||
?~ ris
|
||||
cad.pom
|
||||
:(welp "(reverse-i-search)'" (tufa str.u.ris) "': ")
|
||||
:- (reap (lent buf.say.inp) `@c`'*') :: hidden input
|
||||
%+ welp
|
||||
cad.pom
|
||||
?~ buf.say.inp ~
|
||||
:(welp "<" (scow %p (end 4 1 (sham buf.say.inp))) "> ")
|
||||
--
|
||||
++ edit :: produce sole-edits
|
||||
|%
|
||||
|
Loading…
Reference in New Issue
Block a user