ui.py: do_pager(): update LESS environment var

This commit is contained in:
The MMGen Project 2023-09-25 13:25:01 +00:00
commit eee6167327
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2

View file

@ -113,9 +113,7 @@ def do_pager(text):
pagers = ['less','more']
end_msg = '\n(end of text)\n\n'
# --- Non-MSYS Windows code deleted ---
# raw, chop, horiz scroll 8 chars, disable buggy line chopping in MSYS
os.environ['LESS'] = '--shift 16 -RS' if gc.platform == 'win' else '--shift 8 -RS'
os.environ['LESS'] = '--jump-target=2 --shift=4 --tabs=4 --RAW-CONTROL-CHARS --chop-long-lines'
if 'PAGER' in os.environ and os.environ['PAGER'] != pagers[0]:
pagers = [os.environ['PAGER']] + pagers