set all priority at init time
Vladimir Bauer
6 years ago
| 251 | 251 | // this ensures no bar ends up with less than 100% rendered |
| 252 | 252 | defer func() { |
| 253 | 253 | s.barShutdownQueue = append(s.barShutdownQueue, b) |
| 254 | if !b.noPop && s.popCompleted { | |
| 255 | b.priority = -1 | |
| 256 | } | |
| 257 | 254 | }() |
| 258 | 255 | } |
| 259 | 256 | lineCount += b.extendedLines + 1 |
| 360 | 357 | } |
| 361 | 358 | } |
| 362 | 359 | |
| 360 | if s.popCompleted && !bs.noPop { | |
| 361 | bs.priority = -1 | |
| 362 | } | |
| 363 | ||
| 363 | 364 | bs.bufP = bytes.NewBuffer(make([]byte, 0, bs.width)) |
| 364 | 365 | bs.bufB = bytes.NewBuffer(make([]byte, 0, bs.width)) |
| 365 | 366 | bs.bufA = bytes.NewBuffer(make([]byte, 0, bs.width)) |