Skip to content
Myr

Calculate line length correctly

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent dd39a03 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:click/_termui_impl.py+2 added-2 removed
186 unmodified lines
187 if self.max_width is not None:188 clear_width = self.max_width189 self.file.write(BEFORE_BAR)190 line = self.format_progress_line()191 line_len = len(line)191 line_len = len(strip_ansi(line))192 if self.max_width is None or self.max_width < line_len:193 self.max_width = line_len194 # Use echo here so that we get colorama support.195 echo(line, file=self.file, nl=False)
26 unmodified lines
222 self.current_item = rv223 except StopIteration:224 self.finish()225 self.render_progress()226 raise226 raise StopIteration()227 else:228 self.make_step()229 self.render_progress()230 return rv
61 unmodified lines