mirror of
				https://github.com/Maks1mS/bubbles.git
				synced 2025-10-31 05:42:01 +03:00 
			
		
		
		
	Remove unused ErrMsg type from textinput module
This commit is contained in:
		| @@ -20,11 +20,6 @@ var ( | |||||||
| 	color func(s string) termenv.Color = termenv.ColorProfile().Color | 	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. | // Model is the Tea model for this text input element. | ||||||
| type Model struct { | type Model struct { | ||||||
| 	Err              error | 	Err              error | ||||||
| @@ -382,9 +377,6 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) { | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 	case ErrMsg: |  | ||||||
| 		m.Err = msg |  | ||||||
|  |  | ||||||
| 	case BlinkMsg: | 	case BlinkMsg: | ||||||
| 		m.blink = !m.blink | 		m.blink = !m.blink | ||||||
| 		return m, Blink(m) | 		return m, Blink(m) | ||||||
| @@ -440,10 +432,7 @@ func placeholderView(m Model) string { | |||||||
|  |  | ||||||
| 	// Cursor | 	// Cursor | ||||||
| 	if m.blink && m.PlaceholderColor != "" { | 	if m.blink && m.PlaceholderColor != "" { | ||||||
| 		v += cursorView( | 		v += cursorView(m.colorPlaceholder(p[:1]), m) | ||||||
| 			m.colorPlaceholder(p[:1]), |  | ||||||
| 			m, |  | ||||||
| 		) |  | ||||||
| 	} else { | 	} else { | ||||||
| 		v += cursorView(p[:1], m) | 		v += cursorView(p[:1], m) | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user