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