Fix cursor movement when deleting tasks

This commit is contained in:
Joscha 2018-10-23 15:36:21 +00:00
parent 54e192aa8c
commit 04dbb364cc

View file

@ -85,7 +85,9 @@ deleteTask :: TaskList n -> TaskList n
deleteTask tl@(TaskList list) = deleteTask tl@(TaskList list) =
case B.listSelected list of case B.listSelected list of
Nothing -> tl Nothing -> tl
Just index -> TaskList $ B.listMoveBy 1 $ B.listRemove index list Just index
| index == 0 -> TaskList $ B.listRemove index list
| otherwise -> TaskList $ B.listMoveBy 1 $ B.listRemove index list
{- helper functions -} {- helper functions -}