1-- Copyright 2009-2010 Corey O'Connor
2module Graphics.Vty.Debug ( module Graphics.Vty.Debug
3 , module Graphics.Vty.Debug.Image
7import Graphics.Vty.Prelude
9import Graphics.Vty.Attributes
10import Graphics.Vty.Debug.Image
11import Graphics.Vty.Span
13import qualified Data.Vector as Vector
15rowOpsEffectedColumns :: DisplayOps -> [Int]
16rowOpsEffectedColumns ops
17 = Vector.toList $ Vector.map spanOpsEffectedColumns ops
19allSpansHaveWidth :: DisplayOps -> Int -> Bool
20allSpansHaveWidth ops expected
21 = all (== expected) $ Vector.toList $ Vector.map spanOpsEffectedColumns ops
23spanOpsEffectedRows :: DisplayOps -> Int
24spanOpsEffectedRows ops
25 = toEnum $ length (filter (not . null . Vector.toList) (Vector.toList ops))
27type SpanConstructLog = [SpanConstructEvent]
28data SpanConstructEvent = SpanSetAttr Attr
30isSetAttr :: Attr -> SpanConstructEvent -> Bool
31isSetAttr expectedAttr (SpanSetAttr inAttr)
32 | inAttr == expectedAttr = True
33isSetAttr _attr _event = False
35data MockWindow = MockWindow Int Int
38regionForWindow :: MockWindow -> DisplayRegion
39regionForWindow (MockWindow w h) = (w,h)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list