24
24
)
25
25
from .._typing_compat import Literal
26
26
27
- import blessings
28
27
import greenlet
29
28
from curtsies import (
30
29
FSArray ,
37
36
)
38
37
from curtsies .configfile_keynames import keymap as key_dispatch
39
38
from curtsies .input import is_main_thread
39
+ from curtsies .window import BaseWindow
40
40
from cwcwidth import wcswidth
41
41
from pygments import format as pygformat
42
42
from pygments .formatters import TerminalFormatter
@@ -326,6 +326,7 @@ class BaseRepl(Repl):
326
326
def __init__ (
327
327
self ,
328
328
config : Config ,
329
+ window : BaseWindow ,
329
330
locals_ : Optional [Dict [str , Any ]] = None ,
330
331
banner : Optional [str ] = None ,
331
332
interp : Optional [Interp ] = None ,
@@ -340,6 +341,7 @@ def __init__(
340
341
"""
341
342
342
343
logger .debug ("starting init" )
344
+ self .window = window
343
345
344
346
# If creating a new interpreter on undo would be unsafe because initial
345
347
# state was passed in
@@ -2077,7 +2079,7 @@ def focus_on_subprocess(self, args):
2077
2079
try :
2078
2080
signal .signal (signal .SIGWINCH , self .orig_sigwinch_handler )
2079
2081
with Termmode (self .orig_stdin , self .orig_tcattrs ):
2080
- terminal = blessings . Terminal ( stream = sys . __stdout__ )
2082
+ terminal = self . window . t
2081
2083
with terminal .fullscreen ():
2082
2084
sys .__stdout__ .write (terminal .save )
2083
2085
sys .__stdout__ .write (terminal .move (0 , 0 ))
0 commit comments