From ccfe7d5ac371d8a3cb7384455ff6dd855ffa6230 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Tue, 24 Mar 2026 15:46:38 +0000 Subject: [PATCH] `_pyrepl/pager.py`: call `less` with `--clear-screen` --- Lib/_pyrepl/pager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_pyrepl/pager.py b/Lib/_pyrepl/pager.py index 1fddc63e3ee3ad..92afaa5933a225 100644 --- a/Lib/_pyrepl/pager.py +++ b/Lib/_pyrepl/pager.py @@ -138,7 +138,7 @@ def pipe_pager(text: str, cmd: str, title: str = '') -> None: '.' '?e (END):?pB %pB\\%..' ' (press h for help or q to quit)') - env['LESS'] = '-RmPm{0}$PM{0}$'.format(prompt_string) + env['LESS'] = '-RcmPm{0}$PM{0}$'.format(prompt_string) proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, errors='backslashreplace', env=env) assert proc.stdin is not None