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
15row_ops_effected_columns :: DisplayOps -> [Int]
16row_ops_effected_columns ops
17 = Vector.toList $ Vector.map span_ops_effected_columns ops
19all_spans_have_width :: DisplayOps -> Int -> Bool
20all_spans_have_width ops expected
21 = all (== expected) $ Vector.toList $ Vector.map span_ops_effected_columns ops
23span_ops_effected_rows :: DisplayOps -> Int
24span_ops_effected_rows ops
25 = toEnum $ length (filter (not . null . Vector.toList) (Vector.toList ops))
27type SpanConstructLog = [SpanConstructEvent]
28data SpanConstructEvent = SpanSetAttr Attr
30is_set_attr :: Attr -> SpanConstructEvent -> Bool
31is_set_attr expected_attr (SpanSetAttr in_attr)
32 | in_attr == expected_attr = True
33is_set_attr _attr _event = False
35data MockWindow = MockWindow Int Int
38region_for_window :: MockWindow -> DisplayRegion
39region_for_window (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