diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Much/Action.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Much/Action.hs b/src/Much/Action.hs index 5872964..1e4785a 100644 --- a/src/Much/Action.hs +++ b/src/Much/Action.hs @@ -96,6 +96,17 @@ moveToParent q@State{..} = i -> moveTreeDown i q' +moveCursorToThread :: Monad m => State -> m State +moveCursorToThread q@State{..} = + case Z.label cursor of + TVSearch _ -> + return q { flashMessage = "cannot go further up" } + TVSearchResult _ -> + return q + _ -> + moveToParent q >>= moveCursorToThread + + moveCursorToUnread :: (Num a, Monad m, Eq a) => (Z.TreePos Z.Full TreeView -> Maybe (Z.TreePos Z.Full TreeView)) |