summaryrefslogtreecommitdiffstats
path: root/src/shared/ptyfwd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-19 23:39:13 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2024-01-20 02:11:48 +0100
commite4924fb0d1fa474f0c0874eefd872ad72626a76c (patch)
treec201144b3beb3f723c2d392bf3ab7a64bff1c61f /src/shared/ptyfwd.c
parentrun: the --background= switch expects an argument (diff)
downloadsystemd-e4924fb0d1fa474f0c0874eefd872ad72626a76c.tar.xz
systemd-e4924fb0d1fa474f0c0874eefd872ad72626a76c.zip
ptyfwd: when leaving a session with tinted background, clear to end of screen
So if we tint the background of a ptyfwd session with a color and the session ends, then so far we reset the bg color and clear till the end of line. Let's instead clear till the end of the screen. This is nicer since it means that any follow-up output will not be affected by the changed background color anymore.
Diffstat (limited to 'src/shared/ptyfwd.c')
-rw-r--r--src/shared/ptyfwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c
index 03660ad417..c05ce79489 100644
--- a/src/shared/ptyfwd.c
+++ b/src/shared/ptyfwd.c
@@ -115,7 +115,7 @@ static void pty_forward_disconnect(PTYForward *f) {
(void) fd_nonblock(f->output_fd, false);
if (colors_enabled())
- (void) loop_write(f->output_fd, ANSI_NORMAL ANSI_ERASE_TO_END_OF_LINE, SIZE_MAX);
+ (void) loop_write(f->output_fd, ANSI_NORMAL ANSI_ERASE_TO_END_OF_SCREEN, SIZE_MAX);
if (f->close_output_fd)
f->output_fd = safe_close(f->output_fd);