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 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 -}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue