summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-06-20 17:06:44 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-06-20 17:06:44 +0900
commit2326c74eb241d4667545eae3deaded4a06710521 (patch)
treeeb112b5ab74e92748b31a183da8a7668610332f4 /src
parentb9d15569e88d5abc5cfeaaf64c5aed3f95ee71da (diff)
downloadfzf-2326c74eb241d4667545eae3deaded4a06710521.tar.gz
Code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/tui/light_unix.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/tui/light_unix.go b/src/tui/light_unix.go
index 06099d2f..c2d5612a 100644
--- a/src/tui/light_unix.go
+++ b/src/tui/light_unix.go
@@ -33,15 +33,9 @@ func (r *LightRenderer) fd() int {
return int(r.ttyin.Fd())
}
-func (r *LightRenderer) initPlatform() error {
- fd := r.fd()
- origState, err := term.GetState(fd)
- if err != nil {
- return err
- }
- r.origState = origState
- term.MakeRaw(fd)
- return nil
+func (r *LightRenderer) initPlatform() (err error) {
+ r.origState, err = term.MakeRaw(r.fd())
+ return err
}
func (r *LightRenderer) closePlatform() {