Fix multi-line search in buffer bug.

Added: display new line character in selection.
Fixed a crash when trying to write into a broken pipe.
This commit is contained in:
Martín Lucas Golini
2025-01-30 01:12:41 -03:00
parent c47703ff13
commit 87fb9538cb
5 changed files with 72 additions and 48 deletions

View File

@@ -38,7 +38,16 @@ void BusProcess::startAsyncRead( ReadFn readFn ) {
}
size_t BusProcess::write( const char* buffer, const size_t& size ) {
return mProcess.write( buffer, size );
if ( mState == State::Running ) {
if ( !mProcess.isAlive() ) {
setState( State::Closed );
return 0;
}
return mProcess.write( buffer, size );
}
return 0;
}
} // namespace ecode