DRYer
This commit is contained in:
parent
b3bc5a5565
commit
9db1d581f7
1 changed files with 1 additions and 3 deletions
|
|
@ -7,8 +7,6 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"kitty/tools/tty"
|
||||
"kitty/tools/utils"
|
||||
)
|
||||
|
|
@ -31,7 +29,7 @@ func (self *Loop) dispatch_input_data(data []byte) error {
|
|||
|
||||
func read_ignoring_temporary_errors(f *tty.Term, buf []byte) (int, error) {
|
||||
n, err := f.Read(buf)
|
||||
if err == unix.EINTR || err == unix.EAGAIN || err == unix.EWOULDBLOCK {
|
||||
if is_temporary_error(err) {
|
||||
return 0, nil
|
||||
}
|
||||
if n == 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue