Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vnlitvinov
Copy link
Contributor

Original approach used GetSystemMetrics() which actually returned minimal possible size of a window in pixels (most likely even without paying attention to non-zero border sizes).

I'm switching it to already used GetConsoleScreenBufferInfo() (already used in writer_windows.go) which among others returns currently visible window (from which terminal size could be easily calculated).

Without that fix uiprogress on Windows almost always clears the window because it erroneously detects overflows when they aren't actually present.

@cdrage
Copy link

cdrage commented Dec 3, 2019

I can confirm that this works for me as well, thank you @vnlitvinov

Ping @gosuri

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.

3 participants