diff --git a/uttt.c b/uttt.c index 769bbfd..961fe4c 100644 --- a/uttt.c +++ b/uttt.c @@ -458,6 +458,10 @@ int ut_sockgetpos(const struct ut_state *state, int sock, int *y, int *x, bool r char byte; while (true) { if (ut_readfill(sock, &byte, 1)) {return 1;} + // allow \r\n + if (index == 3 && byte == '\r') { + if (ut_readfill(sock, &byte, 1)) {return 1;} + } if (index == 0 && byte == '|') { if (ut_ignore_line(sock)) {return -1;} } else if (index == 0) {