Skip to content

Commit

Permalink
cli: improve rendering performance of spinners
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Jul 30, 2024
1 parent b35b695 commit 42bdb58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/sst/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ func CmdInit(cli *cli.Cli) error {
fmt.Println()

p := promptui.Select{
Items: []string{"Yes", "No"},
Label: "‏‏‎ ‎Continue",
HideSelected: true,
Items: []string{"Yes", "No"},
HideHelp: true,
}

Expand Down
4 changes: 3 additions & 1 deletion cmd/sst/mosaic/ui/footer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (m *footer) Render(width int, next string) {

if len(oldLines) > 0 {
for i := range oldLines {
out.WriteString(ansi.EraseEntireLine)
if i <= len(oldLines)-len(nextLines) {
out.WriteString(ansi.EraseEntireLine)
}
if i < len(oldLines)-1 {
out.WriteString(ansi.CursorUp1)
}
Expand Down

0 comments on commit 42bdb58

Please sign in to comment.