Fix cursor movement when deleting tasks
This commit is contained in:
parent
54e192aa8c
commit
04dbb364cc
1 changed files with 3 additions and 1 deletions
|
|
@ -85,7 +85,9 @@ deleteTask :: TaskList n -> TaskList n
|
|||
deleteTask tl@(TaskList list) =
|
||||
case B.listSelected list of
|
||||
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 -}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue