From 26ca3f9bad8fd8643bf4047f096680d64c9264a2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 18 Jan 2023 16:16:11 +0530 Subject: [PATCH] Simplify code --- tools/tui/loop/read.go | 4 ---- tools/tui/loop/write.go | 3 --- 2 files changed, 7 deletions(-) diff --git a/tools/tui/loop/read.go b/tools/tui/loop/read.go index a58046d4a..f7693e3d2 100644 --- a/tools/tui/loop/read.go +++ b/tools/tui/loop/read.go @@ -67,10 +67,6 @@ func read_from_tty(pipe_r *os.File, term *tty.Term, results_channel chan<- []byt } if selector.IsReadyToRead(pipe_fd) { keep_going = false - return - } - if selector.IsReadyToRead(tty_fd) { - return } } diff --git a/tools/tui/loop/write.go b/tools/tui/loop/write.go index 982cfa6cb..29b948f2d 100644 --- a/tools/tui/loop/write.go +++ b/tools/tui/loop/write.go @@ -152,9 +152,6 @@ func write_to_tty( break } } - if selector.IsReadyToWrite(tty_fd) { - return - } if selector.IsReadyToRead(pipe_fd) { keep_going = false }