Closed FJLendinez closed 5 years ago
Why not use shutil.get_terminal_size()?
Is better to use it https://gist.github.com/jtriley/1108174 than shutil
PS: shutil.get_terminal_sized == os.terminal_size
That code looks like it was meant for Python 2. shutil.get_terminal_size() was added in Python 3.3. I haven't looked into how it's implemented, but I get the sense that it's meant to work across platforms.
Yes, i saw it, shutil is better. I will commit it
shutil.get_terminal_size() returns (columns, lines)
but you're taking the lines result now. It also probably isn't necessary it call int() on the result anymore.
Right, i didn't see that.
You're still taking the wrong value. Should be COLUMNS, _ = ...
Right thanks i was clueless 😥
No worries, it happens to me all the time.
When bullet calculate the width of terminal could fail throwing this stacktrace: