Skip to content

Commit

Permalink
fixed #9
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Jun 5, 2022
1 parent 522c610 commit 8448b5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions area.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func (area *Area) Clear() {
func (area *Area) Update(content string) {
area.Clear()
lines := strings.Split(content, "\n")

fmt.Println(strings.Repeat("\n", len(lines)-1)) // This appends space if the terminal is at the bottom
Up(len(lines))

if runtime.GOOS == "windows" {
for _, line := range lines {
fmt.Print(line)
Expand Down

0 comments on commit 8448b5e

Please sign in to comment.