mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-01 02:27:15 +03:00
MouseDemo: whitespace
This commit is contained in:
parent
84924f41c1
commit
2838263c22
@ -88,12 +88,18 @@ appEvent :: T.BrickEvent Name e -> T.EventM Name St ()
|
||||
appEvent ev@(T.MouseDown n _ _ loc) = do
|
||||
lastReportedClick .= Just (n, loc)
|
||||
T.withLens edit $ E.handleEditorEvent ev
|
||||
appEvent (T.MouseUp {}) = lastReportedClick .= Nothing
|
||||
appEvent (T.VtyEvent (V.EvMouseUp {})) = lastReportedClick .= Nothing
|
||||
appEvent (T.VtyEvent (V.EvKey V.KUp [V.MCtrl])) = M.vScrollBy (M.viewportScroll Prose) (-1)
|
||||
appEvent (T.VtyEvent (V.EvKey V.KDown [V.MCtrl])) = M.vScrollBy (M.viewportScroll Prose) 1
|
||||
appEvent (T.VtyEvent (V.EvKey V.KEsc [])) = M.halt
|
||||
appEvent ev = T.withLens edit $ E.handleEditorEvent ev
|
||||
appEvent (T.MouseUp {}) =
|
||||
lastReportedClick .= Nothing
|
||||
appEvent (T.VtyEvent (V.EvMouseUp {})) =
|
||||
lastReportedClick .= Nothing
|
||||
appEvent (T.VtyEvent (V.EvKey V.KUp [V.MCtrl])) =
|
||||
M.vScrollBy (M.viewportScroll Prose) (-1)
|
||||
appEvent (T.VtyEvent (V.EvKey V.KDown [V.MCtrl])) =
|
||||
M.vScrollBy (M.viewportScroll Prose) 1
|
||||
appEvent (T.VtyEvent (V.EvKey V.KEsc [])) =
|
||||
M.halt
|
||||
appEvent ev =
|
||||
T.withLens edit $ E.handleEditorEvent ev
|
||||
|
||||
aMap :: AttrMap
|
||||
aMap = attrMap V.defAttr
|
||||
|
Loading…
Reference in New Issue
Block a user