summaryrefslogtreecommitdiff
path: root/src/shared/pager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-10 21:10:17 +0100
committerSven Eden <yamakuzure@gmx.net>2017-11-10 21:10:17 +0100
commit858ba8e89f95cfbe734c5eca69e5c77e4291d786 (patch)
treeadfcb70391251461278a0fe2516e5223f9e7f6b8 /src/shared/pager.c
parentb4644d6fc82c447561ec6208e8c64fb230a7506d (diff)
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 'src/shared/pager.c')
-rw-r--r--src/shared/pager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c
index ce0f37066..a364fa7e1 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");