From 5ccec02c772a5e242e8b2b71203682137f3c5e06 Mon Sep 17 00:00:00 2001
From: Sergey Matveev <stargrave@stargrave.org>
Date: Tue, 31 Oct 2023 19:35:10 +0300
Subject: [PATCH] Clear less'es screen

---
 src/nnn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c
index 2d9f6dbc..16ada363 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -7501,7 +7501,7 @@ nochange:
 				continue;
 			case SEL_VIEW:
 				if (!(g_state.picker || g_state.fifomode))
-					spawn(pager, newpath, NULL, NULL, F_CLI);
+					spawn("less --clear-screen", newpath, NULL, NULL, F_CLI);
 				continue;
 			default: /* SEL_LOCK */
 				lock_terminal();
-- 
2.50.0