mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
fix: set error status flag based on exit code
- Modify setExitCode function to use actual exit code value for error status - When exit code is 0 (success), do not set error flag - When exit code is non-zero (failure), set error flag
This commit is contained in:
@@ -2512,11 +2512,11 @@ void Screen::setReplMode(int mode)
|
||||
}
|
||||
}
|
||||
|
||||
void Screen::setExitCode(int /*exitCode*/)
|
||||
void Screen::setExitCode(int exitCode)
|
||||
{
|
||||
int y = _cuY - 1;
|
||||
while (y >= 0) {
|
||||
_lineProperties[y].flags.f.error = 1;
|
||||
_lineProperties[y].flags.f.error = (exitCode != 0);
|
||||
if (_lineProperties[y].flags.f.prompt_start) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user