Display root+tree selection when aiming

This commit is contained in:
2024-10-28 14:26:09 +00:00
parent 53557965d0
commit 97c3f1262b
6 changed files with 130 additions and 82 deletions
+10
View File
@@ -195,6 +195,16 @@ locUp (LocLDT c@LeftwardLDT{} t) = Just $ LocLDT (_cldtUp c)
locUp (LocLDT c@RightwardLDT{} t) = Just $ LocLDT (_cldtUp c)
(LDT (_cldtParent c) (_cldtFarLeft c) (_cldtCloseLeft c ++ ((_cldtLink c,t):_cldtCloseRight c)))
locToTop :: LocationLDT b a -> LocationLDT b a
locToTop loc = maybe loc locToTop $ locUp loc
--locToTop = fix $ \x -> fromMaybe x $ locUp x
locLeftmost :: LocationLDT b a -> LocationLDT b a
locLeftmost loc = maybe loc locLeftmost $ alaf Last foldMap Just $ locGoLeft loc
locRightmost :: LocationLDT b a -> LocationLDT b a
locRightmost loc = maybe loc locRightmost $ alaf First foldMap Just $ locGoRight loc
-- should probably do tests for these
locGoLeft :: LocationLDT b a -> [LocationLDT b a]
locGoLeft (LocLDT c (LDT v l r)) =