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

fix: duplicate rendering of extra empty lines #168

Closed
wants to merge 1 commit into from

Conversation

tukaelu
Copy link
Contributor

@tukaelu tukaelu commented Oct 23, 2023

Hi, @schollz

As I commented in Issue #97, the implementation that clears the current line fills too much extra space for the width of the terminal, and some terminal software makes it look as if the line is broken.

The reason is that in the current implementation s.maxLineWidth keeps increasing and exceeds the width of the terminal.

str := fmt.Sprintf("\r%s\r", strings.Repeat(" ", s.maxLineWidth))

I think that filling the space with the width of the terminal would probably solve the problem you are having, but could you please confirm this?

screenshots📸

before

If go run examples/basic on the master branch, it will look like this.

スクリーンショット 2023-10-24 8 09 33

after

This PR solves this problem.

スクリーンショット 2023-10-24 8 08 08

@tukaelu
Copy link
Contributor Author

tukaelu commented Oct 25, 2023

This PR has been found to be a problem and is closed.

@tukaelu tukaelu closed this Oct 25, 2023
@tukaelu tukaelu deleted the fix/extra-empty-lines branch October 25, 2023 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant