Skip to content

Commit 1c87b82

Browse files
committed
Make use of blessed.Terminal.cbreak if we can
1 parent 268bd81 commit 1c87b82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

curtsies/window.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ def __init__(
270270
self._last_cursor_column: Optional[int] = None
271271
self._last_cursor_row: Optional[int] = None
272272
self.keep_last_line = keep_last_line
273-
self.cbreak = Cbreak(self.in_stream)
273+
self.cbreak = (
274+
Cbreak(self.in_stream)
275+
if in_stream != sys.__stdin__ and out_stream != sys.__stdout__
276+
else self.t.cbreak()
277+
)
274278
self.extra_bytes_callback = extra_bytes_callback
275279

276280
# whether another SIGWINCH is queued up

0 commit comments

Comments
 (0)