mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 19:27:58 +08:00
Fix build on Windows.
This commit is contained in:
parent
6d3e56b4a1
commit
de8189a646
|
@ -3,7 +3,7 @@ package tty
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/elves/elvish/sys"
|
||||
"github.com/elves/elvish/util"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
@ -33,9 +33,9 @@ func setup(in, out *os.File) (func() error, error) {
|
|||
errVT := setupVT(out)
|
||||
|
||||
return func() error {
|
||||
return sys.CatErrors(
|
||||
return util.Errors(
|
||||
windows.SetConsoleMode(hIn, oldInMode),
|
||||
windows.SetConsoleMode(hOut, oldOutMode),
|
||||
restoreVT())
|
||||
}, sys.CatErrors(errSetIn, errSetOut, errVT)
|
||||
restoreVT(out))
|
||||
}, util.Errors(errSetIn, errSetOut, errVT)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user