chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: add hexmem() and strextend() calls
[elogind.git]
/
src
/
shared
/
pager.c
diff --git
a/src/shared/pager.c
b/src/shared/pager.c
index 5165d2b1c854f101285e8e58fef06d297a66f988..8dddf24f4c7816ba7e739016563f4c92b282cca2 100644
(file)
--- a/
src/shared/pager.c
+++ b/
src/shared/pager.c
@@
-44,7
+44,7
@@
_noreturn_ static void pager_fallback(void) {
_exit(EXIT_SUCCESS);
}
_exit(EXIT_SUCCESS);
}
-int pager_open(
voi
d) {
+int pager_open(
bool jump_to_en
d) {
int fd[2];
const char *pager;
pid_t parent_pid;
int fd[2];
const char *pager;
pid_t parent_pid;
@@
-85,7
+85,10
@@
int pager_open(void) {
dup2(fd[0], STDIN_FILENO);
close_pipe(fd);
dup2(fd[0], STDIN_FILENO);
close_pipe(fd);
- setenv("LESS", "FRSXK", 0);
+ if (jump_to_end)
+ setenv("LESS", "FRSXMK+G", 1);
+ else
+ setenv("LESS", "FRSXMK", 1);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)