m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 07:13:48 -05:00

Code cleanup

This commit is contained in:
Junegunn Choi
2024-06-20 17:06:44 +09:00
parent b9d15569e8
commit 2326c74eb2

View File

@@ -33,16 +33,10 @@ func (r *LightRenderer) fd() int {
return int(r.ttyin.Fd()) return int(r.ttyin.Fd())
} }
func (r *LightRenderer) initPlatform() error { func (r *LightRenderer) initPlatform() (err error) {
fd := r.fd() r.origState, err = term.MakeRaw(r.fd())
origState, err := term.GetState(fd)
if err != nil {
return err return err
} }
r.origState = origState
term.MakeRaw(fd)
return nil
}
func (r *LightRenderer) closePlatform() { func (r *LightRenderer) closePlatform() {
r.ttyout.Close() r.ttyout.Close()