Closed sergargar closed 1 year ago
It doesn't break, there isn't any bug in texts that I know of. Look:
https://user-images.githubusercontent.com/6652853/222478337-cacefa53-f316-4e67-b7d9-0aa5fa90e0c0.mov
Here is the code, if you'd like to try in your terminal:
with alive_bar(1000) as bar:
for i in range(1000):
time.sleep(.01)
bar()
if i // 100 % 2 == 0:
bar.text = f'A long text, that could take your whole line! {i}'
else:
bar.text = f'short text {i}'
In my case, I also use a dynamic bar.title
, I think that is the issue.
Just for completeness, dynamic titles work too:
https://user-images.githubusercontent.com/6652853/222864167-504f33f6-b51c-4c46-8992-f36726cc3024.mov
And even both at the same time!!
https://user-images.githubusercontent.com/6652853/222864423-3feddab0-0ae7-43aa-9413-92ffe1155cdf.mov
That's it, man, there isn't any bug in these mechanisms.
The bar.text() breaks when inserting different length of strings:
It should be
ap-south-east-1
It should be
ap-south-1