Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AreaPrinter does not replace content in Git Bash #616

Open
radulucut opened this issue Jan 19, 2024 · 1 comment
Open

AreaPrinter does not replace content in Git Bash #616

radulucut opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@radulucut
Copy link

When using Git Bash on Windows, the content of the AreaPrinter is not replaced when calling Update, instead it is appended at the end.
Works fine when using the default terminal app.

Example:

package main

import (
	"fmt"
	"time"

	"github.com/pterm/pterm"
)

func main() {
	area, _ := pterm.DefaultArea.Start()
	tableData := pterm.TableData{
		{"Count", "Test"},
		{"", "test"},
	}

	for i := 0; i < 1000; i++ {
		tableData[1][0] = fmt.Sprintf("%d", i)
		t, _ := pterm.DefaultTable.WithHasHeader().WithData(tableData).Srender()
		area.Update(t)
		time.Sleep(100 * time.Millisecond)
	}
}
@radulucut radulucut added the bug Something isn't working label Jan 19, 2024
@aooohan
Copy link

aooohan commented Mar 11, 2024

Screen Shot 2024-03-11 at 21 06 14

I encountered the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants