Fix bug where extra blank line was being adding to output

This commit is contained in:
Christian Rocha
2020-05-11 20:58:21 -04:00
parent 72c1a1c0ef
commit 5ae602953c

2
tea.go
View File

@@ -198,7 +198,7 @@ func (p *Program) Start() error {
// Render a view to the terminal. Returns the number of lines rendered.
func (p *Program) render(model Model, linesRendered int) int {
view := p.view(model) + "\n"
view := "\n" + p.view(model)
// We need to add carriage returns to ensure that the cursor travels to the
// start of a column after a newline