From 43dc8afd1d7e2fb6e0899de6714958e9cd852cb4 Mon Sep 17 00:00:00 2001 From: Joseph Bryan Date: Fri, 3 Mar 2017 15:27:32 -0500 Subject: [PATCH] refactors ++ta-off in drum --- lib/drum.hoon | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/drum.hoon b/lib/drum.hoon index bb5d132a7d..d68777f4f1 100644 --- a/lib/drum.hoon +++ b/lib/drum.hoon @@ -647,9 +647,7 @@ :: ++ ta-off :: reset buffer offset |= ted/sole-edit - =. off ?: |- ?. ?=({$mor *} ted) - ?=({$set *} ted) - |- ?~(p.ted | |(^$(ted i.p.ted) $(p.ted t.p.ted))) + =. off ?: (any:edit ted |=(a/sole-edit ?=($set -.a))) 0 off +> @@ -884,6 +882,11 @@ (cut pos num) (cat pos txt) == + ++ any :: matches? + |= {a/sole-edit b/$-(sole-edit ?)} + ^- ? + ?. ?=($mor -.a) (b a) + (lien p.a |=(c/sole-edit ^$(a c))) -- ++ offset :: calculate offsets |%