summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Slenders <jonathan@slenders.be>2017-03-26 18:36:05 +0200
committerJonathan Slenders <jonathan@slenders.be>2017-03-26 18:36:05 +0200
commitce49e8495bc998bdbae99ba6f1f601ed70c52e55 (patch)
tree7e0f2ee4a981209b201eec52fe32e4c0097e8c5e
parent613b83d2afbbb2d0b89cdd3fe7772e1a6bfddd32 (diff)
Added comment to last commit. (Change about the VMIN flag.)
-rw-r--r--prompt_toolkit/terminal/vt100_input.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/prompt_toolkit/terminal/vt100_input.py b/prompt_toolkit/terminal/vt100_input.py
index b25739e6..74841312 100644
--- a/prompt_toolkit/terminal/vt100_input.py
+++ b/prompt_toolkit/terminal/vt100_input.py
@@ -459,6 +459,12 @@ class raw_mode(object):
else:
newattr[tty.LFLAG] = self._patch_lflag(newattr[tty.LFLAG])
newattr[tty.IFLAG] = self._patch_iflag(newattr[tty.IFLAG])
+
+ # VMIN defines the number of characters read at a time in
+ # non-canonical mode. It seems to default to 1 on Linux, but on
+ # Solaris and derived operating systems it defaults to 4. (This is
+ # because the VMIN slot is the same as the VEOF slot, which
+ # defaults to ASCII EOT = Ctrl-D = 4.)
newattr[tty.CC][termios.VMIN] = 1
termios.tcsetattr(self.fileno, termios.TCSANOW, newattr)