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
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
1 changed files with 1 additions and 1 deletions

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. // Render a view to the terminal. Returns the number of lines rendered.
func (p *Program) render(model Model, linesRendered int) int { 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 // We need to add carriage returns to ensure that the cursor travels to the
// start of a column after a newline // start of a column after a newline