all repos — st @ d83cbc27b99427d00846832a73810f285d8f0d05

st (suckless terminal) config

simplify flushing
Matthias-Christian Ott ott@enolink.de
commit

d83cbc27b99427d00846832a73810f285d8f0d05

parent

3cb67937811b34fcc600b4eb96bd8fdd392ecab4

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M std.cstd.c

@@ -279,7 +279,7 @@ for(;;) {

r = select(ptm + 1, &rfds, NULL, NULL, NULL); if(r == -1) eprintn("error, cannot select"); - if(FD_ISSET(ptm, &rfds)) + if(FD_ISSET(ptm, &rfds)) { do { c = getch(); switch(c) {

@@ -289,8 +289,9 @@ break;

default: putchar(c); } - fflush(stdout); } while(rbuf.i < rbuf.n); + fflush(stdout); + } } return 0; }