From 4bc5f808e4c4891451b83abbc85c4830b3788782 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 18 Jan 2011 23:12:49 +0100 Subject: systemctl: before spawning pager cache number of columns --- src/systemctl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/systemctl.c b/src/systemctl.c index 4f4ee96172..2c8c2cf61d 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -5316,6 +5316,10 @@ static void pager_open(void) { if (!*pager || streq(pager, "cat")) return; + /* Determine and cache number of columns before we spawn the + * pager so that we get the value from the actual tty */ + columns(); + if (pipe(fd) < 0) { log_error("Failed to create pager pipe: %m"); return; -- cgit v1.2.3-54-g00ecf