From 9c10cd058678b579b9f3fce9904eb0794b6ed4c7 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 15 Oct 2020 18:50:28 -0400 Subject: [PATCH] Remove unused ErrMsg type from textinput module --- textinput/textinput.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/textinput/textinput.go b/textinput/textinput.go index 8a67aba..cd93b77 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -20,11 +20,6 @@ var ( color func(s string) termenv.Color = termenv.ColorProfile().Color ) -// ErrMsg indicates there's been an error. We don't handle errors in the this -// package; we're expecting errors to be handle in the program that implements -// this text input. -type ErrMsg error - // Model is the Tea model for this text input element. type Model struct { Err error @@ -382,9 +377,6 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) { } } - case ErrMsg: - m.Err = msg - case BlinkMsg: m.blink = !m.blink return m, Blink(m) @@ -440,10 +432,7 @@ func placeholderView(m Model) string { // Cursor if m.blink && m.PlaceholderColor != "" { - v += cursorView( - m.colorPlaceholder(p[:1]), - m, - ) + v += cursorView(m.colorPlaceholder(p[:1]), m) } else { v += cursorView(p[:1], m) }