diff options
author | Rob Landley <rob@landley.net> | 2008-10-14 08:44:09 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2008-10-14 08:44:09 +0000 |
commit | 5e38cd910acacccb98387b0404bb2130280d0772 (patch) | |
tree | 6f180219a55a24767124545913956a85e7f0357c | |
parent | 988dd5549bc7e6c455bd16929eff7d9566822be1 (diff) | |
download | busybox-w32-5e38cd910acacccb98387b0404bb2130280d0772.tar.gz busybox-w32-5e38cd910acacccb98387b0404bb2130280d0772.tar.bz2 busybox-w32-5e38cd910acacccb98387b0404bb2130280d0772.zip |
Escape sequences sent over serial links don't come in as a block, so poll
needs to pause a bit to make sure the next character has time to come in.
-rw-r--r-- | editors/vi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c index 6902b7688..3c3d759e5 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -2280,7 +2280,7 @@ static char readit(void) // read (maybe cursor) key from stdin | |||
2280 | struct pollfd pfd; | 2280 | struct pollfd pfd; |
2281 | pfd.fd = 0; | 2281 | pfd.fd = 0; |
2282 | pfd.events = POLLIN; | 2282 | pfd.events = POLLIN; |
2283 | if (0 < safe_poll(&pfd, 1, 0) | 2283 | if (0 < safe_poll(&pfd, 1, 300) |
2284 | && 0 < safe_read(0, readbuffer + n, 1)) | 2284 | && 0 < safe_read(0, readbuffer + n, 1)) |
2285 | n++; | 2285 | n++; |
2286 | 2286 | ||