func (c *Cursor) Update(newinput string) {
	a := c.input
	b := []rune(newinput)
	i := c.Position
	a = append(a[:i], append(b, a[i:]...)...)
	c.input = a
	c.Move(len(b))
}
Update inserts newinput into the input []rune in the appropriate place.
The cursor is moved to the end of the inputed sequence.
package promptui
import (
	"fmt"
	"strings"
)
type Pointer func(to []rune) []rune
func defaultCursor(ignored []rune) []rune {
	return []rune("\u2588")
}
func blockCursor(input []rune) []rune {
	return []rune(fmt.Sprintf("\\e[7m%s\\e[0m", string(input)))
}
func pipeCursor(input []rune) []rune {
	marker := []rune("|")
	out := []rune{}
	out = append(out, marker...)
	out = append(out, input...)
	return out
}
var (
	DefaultCursor Pointer = defaultCursor
	BlockCursor Pointer = blockCursor
	PipeCursor Pointer = pipeCursor
)
type Cursor struct {
	Cursor Pointer
	input []rune
	Position int
	erase    bool
}
func NewCursor(startinginput string, pointer Pointer, eraseDefault bool) Cursor {
	if pointer == nil {
		pointer = defaultCursor
	}
	cur := Cursor{Cursor: pointer, Position: len(startinginput), input: []rune(startinginput), erase: eraseDefault}
	if eraseDefault {
		cur.Start()
	} else {
		cur.End()
	}
	return cur
}
func (c *Cursor) String() string {
	return fmt.Sprintf(
		"Cursor: %s, input %s, Position %d",
		string(c.Cursor([]rune(""))), string(c.input), c.Position)
}
func (c *Cursor) End() {
	c.Place(len(c.input))
}
func (c *Cursor) Start() {
	c.Place(0)
}
func (c *Cursor) correctPosition() {
	if c.Position > len(c.input) {
		c.Position = len(c.input)
	}
	if c.Position < 0 {
		c.Position = 0
	}
}
func format(a []rune, c *Cursor) string {
	i := c.Position
	var b []rune
	out := make([]rune, 0)
	if i < len(a) {
		b = c.Cursor(a[i : i+1])
		out = append(out, a[:i]...)    
		out = append(out, b...)        
		out = append(out, a[i+1:]...)  
	} else {
		b = c.Cursor([]rune{})
		out = append(out, a...)
		out = append(out, b...)
	}
	return string(out)
}
func (c *Cursor) Format() string {
	r := c.input
	return format(r, c)
}
func (c *Cursor) FormatMask(mask rune) string {
	if mask == ' ' {
		return format([]rune{}, c)
	}
	r := make([]rune, len(c.input))
	for i := range r {
		r[i] = mask
	}
	return format(r, c)
}