This logic is required to avoid "artifacts" if the terminal is made smaller. One could also just print BEFORE_BAR and a bunch of whitespace (self.width to be precise here) followed by a newline. The newline is eaten up again at line 200.

Some tools handle it this way, some just print a new line. I'm not sure which one I like better.