From 43c1776594b834d27b162c4204f923e3140c6a91 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Jun 2021 21:33:26 +0530 Subject: [PATCH] Handle systems that use less -F as pagers Fix #3740 --- docs/changelog.rst | 4 ++++ kitty/boss.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 582261d90..6b504d8b0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -20,6 +20,10 @@ To update |kitty|, :doc:`follow the instructions `. - macOS: Fix middle-click to paste from clipboard not working (:iss:`3730`) +- When displaying scrollback ensure that the window does not quit is the amount + of scrollback is less than a screen and the user has the ``--quit-if-one-screen`` + option enabled for less (:iss:`3740`) + 0.21.1 [2021-06-14] ---------------------- diff --git a/kitty/boss.py b/kitty/boss.py index e1b0485b0..926c67f7d 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -906,6 +906,8 @@ class Boss: if exe: cmd[0] = exe + if os.path.basename(cmd[0]) == 'less': + cmd.append('-+F') # reset --quit-if-one-screen tab = self.active_tab if tab is not None: bdata = data.encode('utf-8') if isinstance(data, str) else data