From b770a825c98a89b44b3171927c10d990cd2341d3 Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 16 Apr 2021 06:47:14 -0700 Subject: [PATCH] pause echo_stdin --- src/pallets_sphinx_themes/themes/click/domain.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pallets_sphinx_themes/themes/click/domain.py b/src/pallets_sphinx_themes/themes/click/domain.py index ffb21b3..b690cbf 100644 --- a/src/pallets_sphinx_themes/themes/click/domain.py +++ b/src/pallets_sphinx_themes/themes/click/domain.py @@ -24,16 +24,16 @@ class EofEchoingStdin(EchoingStdin): """ def _echo(self, rv): - eof = False + eof = rv[-1] == b"\x04"[0] - if rv[-1] == b"\x04"[0]: + if eof: rv = rv[:-1] - eof = True - self._output.write(rv) + if not self._paused: + self._output.write(rv) - if eof: - self._output.write(b"^D\n") + if eof: + self._output.write(b"^D\n") return rv