mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-07 14:36:59 +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 [] ->
|
||||
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)
|
||||
& stList %~ (handleEvent ev)
|
||||
|
@ -2,6 +2,7 @@
|
||||
module Brick.List
|
||||
( List(listElements)
|
||||
, list
|
||||
, moveBy
|
||||
, drawList
|
||||
, listInsert
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user