// lines returns
//  - the lines that should be drawn
//  - the x & y cursor position from the top left
lines returns
- the lines that should be drawn
- the x & y cursor position from the top left
// lines returns // - the lines that should be drawn // - the x & y cursor position from the top left
func (p *Prompt) lines() ([]string, int, int) {
	var lines []string
	width := int(p.parent.term.GetSize().Width)
	var line strings.Builder
	leftPrompt := p.style.LeftPrompt(p.parent, 0)
	line.WriteString(leftPrompt)
	line.WriteString(util.RuneListToString(p.line))
	rightPrompt := p.style.RightPrompt(p.parent, 0)
	spaces := width - line.Len() - utf8.RuneCountInString(rightPrompt)
	for i := 0; i < spaces; i++ {
		line.WriteString(" ")
	}
	line.WriteString(rightPrompt)
	lines = append(lines, line.String())
	var xPos int = util.PositionInList(p.line, p.pos)
	if xPos == -1 && p.line.Len() > 0 {
		xPos = 0
	}
	xPos += utf8.RuneCountInString(leftPrompt) + 1
	return lines, xPos, 0
}
func ( p * Prompt ) lines ( ) ( [ ] string , int , int ) { var lines [ ] string width := int ( p . parent . term . GetSize ( ) . Width ) var line strings . Builder leftPrompt := p . style . LeftPrompt ( p . parent , 0 ) line . WriteString ( leftPrompt ) line . WriteString ( util . RuneListToString ( p . line ) ) rightPrompt := p . style . RightPrompt ( p . parent , 0 ) spaces := width - line . Len ( ) - utf8 . RuneCountInString ( rightPrompt ) for i := 0 ; i < spaces ; i ++ { line . WriteString ( " " ) } line . WriteString ( rightPrompt ) lines = append ( lines , line . String ( ) ) var xPos int = util . PositionInList ( p . line , p . pos ) if xPos == - 1 && p . line . Len ( ) > 0 { xPos = 0 } xPos += utf8 . RuneCountInString ( leftPrompt ) + 1 return lines , xPos , 0 }
lines returns
 the lines that should be drawn
 the x & y cursor position from the top left
lines returns the lines that should be drawn the x & y cursor position from the top left