mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-08 15:08:46 +03:00
Export list moveBy and use in demo
This commit is contained in:
parent
6c1a61abe2
commit
44e211d18f
@ -77,7 +77,7 @@ appEvent e st =
|
|||||||
|
|
||||||
EvKey KEnter [] ->
|
EvKey KEnter [] ->
|
||||||
let el = length $ listElements $ st^.stList
|
let el = length $ listElements $ st^.stList
|
||||||
in return $ st & stList %~ listInsert el el
|
in return $ st & stList %~ (moveBy 1 . listInsert el el)
|
||||||
|
|
||||||
ev -> return $ st & stEditor %~ (handleEvent ev)
|
ev -> return $ st & stEditor %~ (handleEvent ev)
|
||||||
& stList %~ (handleEvent ev)
|
& stList %~ (handleEvent ev)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
module Brick.List
|
module Brick.List
|
||||||
( List(listElements)
|
( List(listElements)
|
||||||
, list
|
, list
|
||||||
|
, moveBy
|
||||||
, drawList
|
, drawList
|
||||||
, listInsert
|
, listInsert
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user