Dont do extremely small reads

This commit is contained in:
Kovid Goyal
2023-01-18 10:13:07 +05:30
parent 5edb1e2d6b
commit 63077e5432

View File

@@ -71,7 +71,7 @@ func read_from_tty(pipe_r *os.File, term *tty.Term, results_channel chan<- []byt
buf := make([]byte, bufsize)
for keep_going {
if len(buf) == 0 {
if len(buf) < 64 {
buf = make([]byte, bufsize)
}
if wait_for_read_available(); !keep_going {