mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix #101. Thanks to @stegmanh
This commit is contained in:
parent
63299a701e
commit
f1d044dee6
@ -33,6 +33,10 @@ func (list *List) CheckedItems() []*Item {
|
|||||||
|
|
||||||
func (list *List) Delete() {
|
func (list *List) Delete() {
|
||||||
list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
|
list.Items = append(list.Items[:list.selected], list.Items[list.selected+1:]...)
|
||||||
|
|
||||||
|
if list.selected >= len(list.Items) {
|
||||||
|
list.selected--
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (list *List) Demote() {
|
func (list *List) Demote() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user