summaryrefslogtreecommitdiff
path: root/src/tui/tcell_test.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-05-23 20:08:20 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-05-23 21:11:12 +0900
commit3dee8778d073199e0fe1e186e54f7eabc2fdef43 (patch)
tree1c39e76cf456b176cee9c4763ddbd8447e4ce406 /src/tui/tcell_test.go
parentd4216b0dcc13567479d81cc5ad2adedb1443ea8b (diff)
downloadfzf-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.go3
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