From 3dee8778d073199e0fe1e186e54f7eabc2fdef43 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 23 May 2024 20:08:20 +0900 Subject: execute: Open separate handles to /dev/tty (in, out, err) # This will no longer cause 'Vim: Warning: Output is not to a terminal' fzf --bind 'enter:execute:vim {}' > /tmp/foo --- src/tui/tcell_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tui/tcell_test.go') diff --git a/src/tui/tcell_test.go b/src/tui/tcell_test.go index 54b9c9b3..217ad048 100644 --- a/src/tui/tcell_test.go +++ b/src/tui/tcell_test.go @@ -3,6 +3,7 @@ package tui import ( + "os" "testing" "github.com/gdamore/tcell/v2" @@ -20,7 +21,7 @@ func assert(t *testing.T, context string, got interface{}, want interface{}) boo // Test the handling of the tcell keyboard events. func TestGetCharEventKey(t *testing.T) { - if util.ToTty() { + if util.IsTty(os.Stdout) { // This test is skipped when output goes to terminal, because it causes // some glitches: // - output lines may not start at the beginning of a row which makes -- cgit v1.2.3