diff options
| author | mirenn <me@mirenn.dev> | 2026-03-13 16:25:39 +0100 |
|---|---|---|
| committer | mirenn <me@mirenn.dev> | 2026-04-14 09:47:36 +0200 |
| commit | 47d6cc352e11130646220381820555eac47ba088 (patch) | |
| tree | 81b8050d6d290abc20b46ae1056bd1d0c2100102 /src/linenoise/linenoise.c | |
| parent | 6bb1a9b95b09663436c2fe30a8e2185a3f741af1 (diff) | |
| download | inpla-main.tar.gz inpla-main.zip | |
added flag to suppress unimportat outputmain
Diffstat (limited to 'src/linenoise/linenoise.c')
| -rw-r--r-- | src/linenoise/linenoise.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/linenoise/linenoise.c b/src/linenoise/linenoise.c index cfe51e7..57a6b7e 100644 --- a/src/linenoise/linenoise.c +++ b/src/linenoise/linenoise.c @@ -255,7 +255,9 @@ static int enableRawMode(int fd) { raw.c_cc[VMIN] = 1; raw.c_cc[VTIME] = 0; /* 1 byte, no timer */ /* put terminal in raw mode after flushing */ - if (tcsetattr(fd,TCSAFLUSH,&raw) < 0) goto fatal; + //if (tcsetattr(fd,TCSAFLUSH,&raw) < 0) goto fatal; + // https://github.com/antirez/linenoise/issues/43 + if (tcsetattr(fd,TCSADRAIN,&raw) < 0) goto fatal; rawmode = 1; return 0; @@ -266,7 +268,9 @@ fatal: static void disableRawMode(int fd) { /* Don't even check the return value as it's too late. */ - if (rawmode && tcsetattr(fd,TCSAFLUSH,&orig_termios) != -1) + // if (rawmode && tcsetattr(fd,TCSAFLUSH,&orig_termios) != -1) + // https://github.com/antirez/linenoise/issues/43 + if (rawmode && tcsetattr(fd,TCSADRAIN,&orig_termios) != -1) rawmode = 0; } |
