Skip to content
Myr

Merge branch '6.x-maintenance'

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 · parents 6fcda3e, f403b08 · Browse files · 2 files+12 added−3 removed
This commit

State

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

Diff stats

2 files+12 added−3 removed

  • other:+12 added−3 removed

2 files+12 added−3 removed

modified:click/_termui_impl.py+5 added-3 removed
189 unmodified lines
190 }).rstrip()191192 def render_progress(self):193 from .termui import get_terminal_size194 clear_width = self.width194 nl = False195196 if self.is_hidden:197 buf = [self.label]198 nl = True199 else:200 buf = []201 # Update width in case the terminal has been resized202 if self.autowidth:
6 unmodified lines
209 buf.append(' ' * self.max_width)210 self.max_width = new_width211 self.width = new_width212213 clear_width = self.width214 if self.max_width is not None:215 clear_width = self.max_width216217 buf.append(BEFORE_BAR)
2 unmodified lines
220 if self.max_width is None or self.max_width < line_len:221 self.max_width = line_len222 buf.append(line)223222 buf.append(' ' * (clear_width - line_len))224 buf.append(' ' * (clear_width - line_len))225 line = ''.join(buf)226227 # Render the line only if it changed.228 if line != self._last_line:229 self._last_line = line228 echo(line, file=self.file, color=self.color, nl='')230 echo(line, file=self.file, color=self.color, nl=nl)231 self.file.flush()232233 def make_step(self, n_steps):234 self.pos += n_steps
313 unmodified lines
modified:CHANGES+7 added
6 unmodified lines
7-----------89(upcoming release with new features, release date to be decided)1011Version 6.212-----------1314(bugfix release, released on November 27th 2015)1516- Correct fix for hidden progress bars.1718Version 6.119-----------2021(bugfix release, released on November 27th 2015)
299 unmodified lines