Skip to content

Commit

Permalink
On Windows, if keys are pressed while "Waiting for data" is displayed,
Browse files Browse the repository at this point in the history
call ungetcc_back() rather than WIN32ungetch() to unget them.
They should be read by the command processor, not re-read by the
keyboard input code.
  • Loading branch information
gwsw committed Sep 24, 2023
1 parent 735f099 commit 04746ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions os.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public int iread(int fd, unsigned char *buf, unsigned int len)
c = getch();
if (c == '\003')
return (READ_INTR);
ungetch(c);
ungetcc_back(c);
}
#endif
#endif
Expand Down Expand Up @@ -264,7 +264,7 @@ public int iread(int fd, unsigned char *buf, unsigned int len)
reading = 0;
return (READ_INTR);
}
WIN32ungetch(c);
ungetcc_back(c);
}
#endif
#endif
Expand Down

0 comments on commit 04746ad

Please sign in to comment.