diff --git a/ishell.go b/ishell.go index 70dd6a7..f0c2dbf 100644 --- a/ishell.go +++ b/ishell.go @@ -478,7 +478,8 @@ func (s *Shell) multiChoice(options []string, text string, init []int, multiResu return nil } - _, maxRows, err := readline.GetSize(0) + stdoutFd := os.Stdout.Fd() + _, maxRows, err := readline.GetSize(stdoutFd) if err != nil { return nil } @@ -559,7 +560,7 @@ func (s *Shell) multiChoice(options []string, text string, init []int, multiResu case <-refresh: update() case <-t.C: - _, rows, _ := readline.GetSize(0) + _, rows, _ := readline.GetSize(stdoutFd) if maxRows != rows { maxRows = rows update()