mirror of
				https://github.com/Maks1mS/bubbles.git
				synced 2025-10-31 22:01:22 +03:00 
			
		
		
		
	Remove duplicate placeholder code
This commit is contained in:
		| @@ -105,23 +105,7 @@ func View(model tea.Model) string { | |||||||
|  |  | ||||||
| 	// Placeholder text | 	// Placeholder text | ||||||
| 	if m.Value == "" && m.Placeholder != "" { | 	if m.Value == "" && m.Placeholder != "" { | ||||||
| 		var v string | 		return placeholderView(m) | ||||||
|  |  | ||||||
| 		if m.blink { |  | ||||||
| 			v += cursor( |  | ||||||
| 				termenv.String(m.Placeholder[:1]). |  | ||||||
| 					Foreground(m.colorProfile.Color(m.PlaceholderColor)). |  | ||||||
| 					String(), |  | ||||||
| 				m.blink, |  | ||||||
| 			) |  | ||||||
| 		} else { |  | ||||||
| 			v += cursor(m.Placeholder[:1], m.blink) |  | ||||||
| 		} |  | ||||||
|  |  | ||||||
| 		v += termenv.String(m.Placeholder[1:]). |  | ||||||
| 			Foreground(m.colorProfile.Color(m.PlaceholderColor)). |  | ||||||
| 			String() |  | ||||||
| 		return m.Prompt + v |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	v := m.Value[:m.pos] | 	v := m.Value[:m.pos] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user