func (l *List) SetCursor(i int) {
	max := len(l.scope) - 1
	if i >= max {
		i = max
	}
	if i < 0 {
		i = 0
	}
	l.cursor = i

	if l.start > l.cursor {
		l.start = l.cursor
	} else if l.start+l.size <= l.cursor {
		l.start = l.cursor - l.size + 1
	}
}
func (l *List) SetCursor(i int) {
	max := len(l.scope) - 1
	if i >= max {
		i = max
	}
	if i < 0 {
		i = 0
	}
	l.cursor = i

	if l.start > l.cursor {
		l.start = l.cursor
	} else if l.start+l.size <= l.cursor {
		l.start = l.cursor - l.size + 1
	}
}
func ( l * List ) SetCursor ( i int ) { max := len ( l . scope ) - 1 if i >= max { i = max } if i < 0 { i = 0 } l . cursor = i if l . start > l . cursor { l . start = l . cursor } else if l . start + l . size <= l . cursor { l . start = l . cursor - l . size + 1 } }
// SetCursor sets the position of the cursor in the list. Values out of bounds
// will be clamped.
SetCursor sets the position of the cursor in the list . Values out of bounds will be clamped .