diff --git a/asyncssh/editor.py b/asyncssh/editor.py index d2c9ff9..174cae2 100644 --- a/asyncssh/editor.py +++ b/asyncssh/editor.py @@ -704,8 +704,10 @@ def process_input(self, data: str, datatype: DataType) -> None: self._ring_bell() self._bell_rung = False - self._chan.write(''.join(self._outbuf)) - self._outbuf.clear() + + if self._outbuf: + self._chan.write(''.join(self._outbuf)) + self._outbuf.clear() else: self._session.data_received(data, datatype)