diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:10:17 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-11-10 21:10:17 +0100 |
commit | d13b522751504e6ff5720200622265870dc9c1ad (patch) | |
tree | 7a7876246c1cb6abd9ae89e429a1617c5ef5bc47 /src/shared/pager.c | |
parent | loginctl: invoke sigbus_install() (diff) | |
download | systemd-d13b522751504e6ff5720200622265870dc9c1ad.tar.xz systemd-d13b522751504e6ff5720200622265870dc9c1ad.zip |
pager: cache not only number of columns but also of lines before we open pager
Not that we need it, but let's do this as matter of completeness.
Diffstat (limited to '')
-rw-r--r-- | src/shared/pager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c index 0661ff0bb9..da49f9a22d 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -80,9 +80,10 @@ int pager_open(bool no_pager, bool jump_to_end) { if (pager && STR_IN_SET(pager, "", "cat")) return 0; - /* Determine and cache number of columns before we spawn the - * pager so that we get the value from the actual tty */ + /* Determine and cache number of columns/lines before we spawn the pager so that we get the value from the + * actual tty */ (void) columns(); + (void) lines(); if (pipe2(fd, O_CLOEXEC) < 0) return log_error_errno(errno, "Failed to create pager pipe: %m"); |