mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-29 10:54:48 +03:00
listMoveToEnd: use correct destination index (fixes #337)
This commit is contained in:
parent
3227bf9180
commit
f0ceb81ed4
@ -253,7 +253,7 @@ listMoveToBeginning = listMoveTo 0
|
||||
listMoveToEnd :: (Foldable t, Splittable t)
|
||||
=> GenericList n t e
|
||||
-> GenericList n t e
|
||||
listMoveToEnd l = listMoveTo (length $ listElements l) l
|
||||
listMoveToEnd l = listMoveTo (max 0 $ length (listElements l) - 1) l
|
||||
|
||||
-- | The top-level attribute used for the entire list.
|
||||
listAttr :: AttrName
|
||||
|
Loading…
Reference in New Issue
Block a user