diff --git a/src/replxx_impl.cxx b/src/replxx_impl.cxx index e9f332a..7379c99 100644 --- a/src/replxx_impl.cxx +++ b/src/replxx_impl.cxx @@ -332,7 +332,12 @@ Replxx::ReplxxImpl::ReplxxImpl( FILE*, FILE*, FILE* ) } Replxx::ReplxxImpl::~ReplxxImpl( void ) { - disable_bracketed_paste(); + try { + disable_bracketed_paste(); + } catch ( std::runtime_error const& ) { + // suppress "write failed" errors (see Terminal::write8()). + // in case of i.e. broken pipe. + } } Replxx::ACTION_RESULT Replxx::ReplxxImpl::invoke( Replxx::ACTION action_, char32_t code ) {