gc: config option for running --auto in background
[gitweb.git] / pager.c
diff --git a/pager.c b/pager.c
index 345b0bc4b58ef641a653d6244d2ef7558fc84347..0cc75a8eee32a0195a74c6819a04745f341e45e3 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -80,8 +80,15 @@ void setup_pager(void)
        pager_process.use_shell = 1;
        pager_process.argv = pager_argv;
        pager_process.in = -1;
-       if (!getenv("LESS")) {
-               static const char *env[] = { "LESS=FRSX", NULL };
+       if (!getenv("LESS") || !getenv("LV")) {
+               static const char *env[3];
+               int i = 0;
+
+               if (!getenv("LESS"))
+                       env[i++] = "LESS=FRSX";
+               if (!getenv("LV"))
+                       env[i++] = "LV=-c";
+               env[i] = NULL;
                pager_process.env = env;
        }
        if (start_command(&pager_process))