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

ConsoleProgressInfo sometimes writes too long strings #8

Open
dmerejkowsky opened this issue May 8, 2019 · 4 comments
Open

ConsoleProgressInfo sometimes writes too long strings #8

dmerejkowsky opened this issue May 8, 2019 · 4 comments

Comments

@dmerejkowsky
Copy link
Collaborator

Steps to reproduce:

  • create a file: b'test/src/Chopin - Piano\xe3\x80\x80Concerto\xe3\x80\x80No.1.mp3
  • try to rusync from test/src to test/dest in a smallish window
  • your terminal gets flooded instead of the progress staying on one line
@dmerejkowsky
Copy link
Collaborator Author

Found the bug: turns out the string contains a IDEOGRAPHIC SPACE character, so the terminal does what it is supposed to do.

@dmerejkowsky
Copy link
Collaborator Author

This is hard to fix. We may try to guess what the terminal would do by checking for codepoints that represent wide spacing. An other solution would be to talk to the terminal directly to get the "physical" size of the line.

None of it looks easy :/

@dmerejkowsky
Copy link
Collaborator Author

Or ... don't use \r and tell the cursor to go up one line?

@dmerejkowsky
Copy link
Collaborator Author

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

No branches or pull requests

1 participant