diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-15 00:45:23 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-15 00:45:23 +0900 |
commit | 8a110e02b9b33e9c0f1c901d61a84d92acb7094d (patch) | |
tree | 2bf0057b16c6c688e8ea9ee832f213c449de9156 /src | |
parent | 86d92c17c4ad9ff12d550680208c0eae98dd776b (diff) |
Fix tcell test case
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go index 5179b0c9..fe30161c 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -301,6 +301,7 @@ type Terminal struct { slab *util.Slab theme *tui.ColorTheme tui tui.Renderer + ttyin *os.File executing *util.AtomicBool termSize tui.TermSize lastAction actionType @@ -801,6 +802,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor serverOutputChan: make(chan string), eventChan: make(chan tui.Event, 6), // (load + result + zero|one) | (focus) | (resize) | (GetChar) tui: renderer, + ttyin: tui.TtyIn(), initFunc: func() error { return renderer.Init() }, executing: util.NewAtomicBool(false), lastAction: actStart, @@ -2736,7 +2738,7 @@ func (t *Terminal) executeCommand(template string, forcePlus bool, background bo cmd.Env = t.environ() t.executing.Set(true) if !background { - cmd.Stdin = tui.TtyIn() + cmd.Stdin = t.ttyin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr t.tui.Pause(true) @@ -3471,7 +3473,7 @@ func (t *Terminal) Loop() error { if t.history != nil { t.history.append(string(t.input)) } - t.executor.Become(tui.TtyIn(), t.environ(), command) + t.executor.Become(t.ttyin, t.environ(), command) } case actExecute, actExecuteSilent: t.executeCommand(a.a, false, a.t == actExecuteSilent, false, false) |