diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-23 20:08:20 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-23 21:11:12 +0900 |
| commit | 3dee8778d073199e0fe1e186e54f7eabc2fdef43 (patch) | |
| tree | 1c39e76cf456b176cee9c4763ddbd8447e4ce406 /src/tui/tcell_test.go | |
| parent | d4216b0dcc13567479d81cc5ad2adedb1443ea8b (diff) | |
| download | fzf-3dee8778d073199e0fe1e186e54f7eabc2fdef43.tar.gz | |
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
Diffstat (limited to 'src/tui/tcell_test.go')
| -rw-r--r-- | src/tui/tcell_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
