INNER CODE UNIT · Go

CreateInputComponent

jpbruinsslot/slack-term · components/input.go:18

func CreateInputComponent() *Input {
	input := &Input{
		Par:                  termui.NewPar(""),
		Text:                 make([]rune, 0),
		CursorPositionScreen: 0,
		CursorPositionText:   0,
		Offset:               0,
	}

	input.Par.Height = 3

	return input
}

// Buffer implements interface termui.Bufferer
func (i *Input) Buffer() termui.Buffer {
	buf := i.Par.Buffer()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…