1-- Copyright 2009-2010 Corey O'Connor
2module Graphics.Vty.Debug ( module Graphics.Vty.Debug
3 , module Graphics.Vty.Debug.Image
7import Graphics.Vty.Attributes
8import Graphics.Vty.Debug.Image
9import Graphics.Vty.Span
10import Graphics.Vty.DisplayRegion
12import qualified Data.Vector as Vector
14row_ops_effected_columns :: DisplayOps -> [Int]
15row_ops_effected_columns ops
16 = Vector.toList $ Vector.map span_ops_effected_columns ops
18all_spans_have_width :: DisplayOps -> Int -> Bool
19all_spans_have_width ops expected
20 = all (== expected) $ Vector.toList $ Vector.map span_ops_effected_columns ops
22span_ops_effected_rows :: DisplayOps -> Int
23span_ops_effected_rows ops
24 = toEnum $ length (filter (not . null . Vector.toList) (Vector.toList ops))
26type SpanConstructLog = [SpanConstructEvent]
27data SpanConstructEvent = SpanSetAttr Attr
29is_set_attr :: Attr -> SpanConstructEvent -> Bool
30is_set_attr expected_attr (SpanSetAttr in_attr)
31 | in_attr == expected_attr = True
32is_set_attr _attr _event = False
34data MockWindow = MockWindow Int Int
37region_for_window :: MockWindow -> DisplayRegion
38region_for_window (MockWindow w h) = DisplayRegion 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