code: func (l *List) RemoveItem(index int) *List {
  	if len(l.items) == 0 {
  		return l
  	}
  
  	// Adjust index.
  	if index < 0 {
  		index = len(l.items) + index
  	}
  	if index >= len(l.items) {
  		index = len(l.items) - 1
  	}
  	if index < 0 {
  		index = 0
  	}
  
  	// Remove item.
  	l.items = append(l.items[:index], l.items[index+1:]...)
  
  	// If there is nothing left, we're done.
  	if len(l.items) == 0 {
  		return l
  	}
  
  	// Shift current item.
  	previousCurrentItem := l.currentItem
  	if l.currentItem >= index {
  		l.currentItem--
  	}
  
  	// Fire "changed" event for removed items.
  	if previousCurrentItem == index && l.changed != nil {
  		item := l.items[l.currentItem]
  		l.changed(l.currentItem, item.MainText, item.SecondaryText, item.Shortcut)
  	}
  
  	return l
  }
docs: // RemoveItem removes the item with the given index (starting at 0) from the
  // list. If a negative index is provided, items are referred to from the back
  // (-1 = last item, -2 = second-to-last item, and so on). Out of range indices
  // are clamped to the beginning/end, i.e. unless the list is empty, an item is
  // always removed.
  //
  // The currently selected item is shifted accordingly. If it is the one that is
  // removed, a "changed" event is fired.