Prevent cursor from moving when deleting tasks

This commit is contained in:
Joscha 2018-10-23 14:13:05 +00:00
parent 038721177d
commit 05f4343d40

View file

@ -83,9 +83,9 @@ replaceTask task (TaskList list) = TaskList $ B.listModify replace list
deleteTask :: TaskList n -> TaskList n
deleteTask tl@(TaskList list) =
case listSize list of
0 -> tl
n -> TaskList $ B.listRemove (n-1) list
case B.listSelected list of
Nothing -> tl
Just index -> TaskList $ B.listMoveBy 1 $ B.listRemove index list
{- helper functions -}