Merge pull request #118 from Arguggi/master

List: bugfix: correctly update selected index in listInsert
This commit is contained in:
Jonathan Daugherty 2017-02-17 10:18:45 -08:00 committed by GitHub
commit d97dc97cb0

View File

@ -202,7 +202,7 @@ listInsert pos e l =
es = l^.listElementsL
newSel = case l^.listSelectedL of
Nothing -> 0
Just s -> if safePos < s
Just s -> if safePos <= s
then s + 1
else s
(front, back) = V.splitAt safePos es