select.go
func (s *Select) RunCursorAt(cursorPos, scroll int) (int, string, error) {
	if s.Size == 0 {
		s.Size = 5
	}

	l, err := list.New(s.Items, s.Size)
	if err != nil {
		return 0, "", err
	}
	l.Searcher = s.Searcher

	s.list = l

	s.setKeys()

	err = s.prepareTemplates()
	if err != nil {
		return 0, "", err
	}
	return s.innerRun(cursorPos, scroll, ' ')
}
func (s *Select) RunCursorAt(cursorPos, scroll int) (int, string, error) {
	if s.Size == 0 {
		s.Size = 5
	}

	l, err := list.New(s.Items, s.Size)
	if err != nil {
		return 0, "", err
	}
	l.Searcher = s.Searcher

	s.list = l

	s.setKeys()

	err = s.prepareTemplates()
	if err != nil {
		return 0, "", err
	}
	return s.innerRun(cursorPos, scroll, ' ')
}
func ( s * Select ) RunCursorAt ( cursorPos , scroll int ) ( int , string , error ) { if s . Size == 0 { s . Size = 5 } l , err := list . New ( s . Items , s . Size ) if err != nil { return 0 , " " , err } l . Searcher = s . Searcher s . list = l s . setKeys ( ) err = s . prepareTemplates ( ) if err != nil { return 0 , " " , err } return s . innerRun ( cursorPos , scroll , ' ' ) }
// RunCursorAt executes the select list, initializing the cursor to the given
// position. Invalid cursor positions will be clamped to valid values.  It
// displays the label and the list of items, asking the user to chose any value
// within to list. Run will keep the prompt alive until it has been canceled
// from the command prompt or it has received a valid value. It will return
// the value and an error if any occurred during the select's execution.
RunCursorAt executes the select list initializing the cursor to the given position . Invalid cursor positions will be clamped to valid values . It displays the label and the list of items asking the user to chose any value within to list . Run will keep the prompt alive until it has been canceled from the command prompt or it has received a valid value . It will return the value and an error if any occurred during the select s execution .