Skip to content

Commit

Permalink
Fix buffering bug
Browse files Browse the repository at this point in the history
  • Loading branch information
craigds committed Dec 23, 2020
1 parent 19f5ac3 commit 61efc25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/click/_termui_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ def get_pager_file(color=None):
# wrap in a text stream
stream = MaybeStripAnsi(stream, color=color, encoding=encoding)
yield stream
stream.flush()


@contextlib.contextmanager
Expand Down Expand Up @@ -458,7 +459,7 @@ def _tempfilepager(cmd, color=None):
def _nullpager(stream, color=None):
"""Simply print unformatted text. This is the ultimate fallback."""
encoding = get_best_encoding(stream)
return stream, encoding, color
yield stream, encoding, color


class Editor:
Expand Down

0 comments on commit 61efc25

Please sign in to comment.