m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Make fzf immediately quit when failed to read /dev/tty

Close #798
This commit is contained in:
Junegunn Choi
2017-01-11 02:12:32 +09:00
parent 0c127cfdc1
commit 996dcb14a3
4 changed files with 32 additions and 19 deletions

View File

@@ -124,11 +124,11 @@ func (r *FullscreenRenderer) initScreen() {
s, e := tcell.NewScreen()
if e != nil {
fmt.Fprintf(os.Stderr, "%v\n", e)
os.Exit(2)
errorExit()
}
if e = s.Init(); e != nil {
fmt.Fprintf(os.Stderr, "%v\n", e)
os.Exit(2)
errorExit()
}
if r.mouse {
s.EnableMouse()