summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chat.h1
-rw-r--r--term.c11
-rw-r--r--ui.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/chat.h b/chat.h
index b07aa42..afb32ef 100644
--- a/chat.h
+++ b/chat.h
@@ -145,6 +145,7 @@ enum TermEvent {
 	TermPasteEnd,
 };
 void termInit(void);
+void termNoFlow(void);
 void termTitle(const char *title);
 void termMode(enum TermMode mode, bool set);
 enum TermEvent termEvent(char ch);
diff --git a/term.c b/term.c
index 75380ea..fea68ad 100644
--- a/term.c
+++ b/term.c
@@ -18,6 +18,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <termios.h>
+#include <unistd.h>
 
 #include "chat.h"
 
@@ -28,6 +30,15 @@ void termInit(void) {
 	xterm = term && !strncmp(term, "xterm", 5);
 }
 
+void termNoFlow(void) {
+	struct termios attr;
+	int error = tcgetattr(STDIN_FILENO, &attr);
+	if (error) return;
+	attr.c_iflag &= ~IXON;
+	attr.c_cc[VDISCARD] = _POSIX_VDISABLE;
+	tcsetattr(STDIN_FILENO, TCSANOW, &attr);
+}
+
 void termTitle(const char *title) {
 	if (!xterm) return;
 	printf("\33]0;%s\33\\", title);
diff --git a/ui.c b/ui.c
index 9a83bfc..4db7e02 100644
--- a/ui.c
+++ b/ui.c
@@ -189,6 +189,7 @@ void uiInit(void) {
 	cbreak();
 	noecho();
 	termInit();
+	termNoFlow();
 	colorInit();
 	ui.status = newwin(1, COLS, 0, 0);
 	ui.input = newpad(1, 512);
follow=1'>Add .gz to chroot-man scriptJune McEnroe 2020-02-11Add -R restricted flagJune McEnroe 2020-02-11Add chroot targetJune McEnroe 2020-02-11Exit focus and paste modes on err exitJune McEnroe 2020-02-11Add startup GPLv3 note and URLJune McEnroe 2020-02-11Make sure -D_GNU_SOURCE ends up in CFLAGS on LinuxJune McEnroe 2020-02-11Add note about setting PKG_CONFIG_PATHJune McEnroe 2020-02-11Rename query ID on nick changeJune McEnroe 2020-02-11Call completeClear when closing a windowJune McEnroe 2020-02-11Don't insert color codes for non-mentionsJune McEnroe 2020-02-11Take first two words in colorMentionsJune McEnroe 2020-02-11Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe