diff --git a/src/Brick/Focus.hs b/src/Brick/Focus.hs index 7244dca..0c620d3 100644 --- a/src/Brick/Focus.hs +++ b/src/Brick/Focus.hs @@ -10,6 +10,7 @@ module Brick.Focus , focusGetCurrent , focusSetCurrent , focusRingLength + , focusRingToList , focusRingCursor , withFocusRing , focusRingModify @@ -81,6 +82,11 @@ focusSetCurrent n r@(FocusRing l) = focusRingLength :: FocusRing n -> Int focusRingLength (FocusRing l) = C.size l +-- | Starting with the currently-focused, go right and accumulate all +-- resource names of the FocusRing in a list. +focusRingToList :: FocusRing n -> [n] +focusRingToList (FocusRing l) = C.rightElements l + -- | Modify the internal circular list structure of a focus ring -- directly. This function permits modification of the circular list -- using the rich Data.CircularList API.