Skip to content

Commit 74ef692

Browse files
asmeurerjonathanslenders
authored andcommitted
Add PROMPT_TOOLKIT_NO_CPR=1 environment variable to disable CPR requests
See #886 (comment).
1 parent 1cd47b1 commit 74ef692

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

prompt_toolkit/input/vt100.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def __init__(self, stdin):
6969
def responds_to_cpr(self):
7070
# When the input is a tty, we assume that CPR is supported.
7171
# It's not when the input is piped from Pexpect.
72+
if os.environ.get('PROMPT_TOOLKIT_NO_CPR', '') == '1':
73+
return False
7274
return self.stdin.isatty()
7375

7476
def attach(self, input_ready_callback):

0 commit comments

Comments
 (0)