From 5e38cd910acacccb98387b0404bb2130280d0772 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 14 Oct 2008 08:44:09 +0000 Subject: 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. --- editors/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editors/vi.c') 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 struct pollfd pfd; pfd.fd = 0; pfd.events = POLLIN; - if (0 < safe_poll(&pfd, 1, 0) + if (0 < safe_poll(&pfd, 1, 300) && 0 < safe_read(0, readbuffer + n, 1)) n++; -- cgit v1.2.3