Prevent cursor from moving when deleting tasks
This commit is contained in:
parent
038721177d
commit
05f4343d40
1 changed files with 3 additions and 3 deletions
|
|
@ -83,9 +83,9 @@ replaceTask task (TaskList list) = TaskList $ B.listModify replace list
|
||||||
|
|
||||||
deleteTask :: TaskList n -> TaskList n
|
deleteTask :: TaskList n -> TaskList n
|
||||||
deleteTask tl@(TaskList list) =
|
deleteTask tl@(TaskList list) =
|
||||||
case listSize list of
|
case B.listSelected list of
|
||||||
0 -> tl
|
Nothing -> tl
|
||||||
n -> TaskList $ B.listRemove (n-1) list
|
Just index -> TaskList $ B.listMoveBy 1 $ B.listRemove index list
|
||||||
|
|
||||||
{- helper functions -}
|
{- helper functions -}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue