about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-09 07:09:51 -0500
committerJune McEnroe <june@causal.agency>2020-02-09 07:09:56 -0500
commit2aa2005339750e64a587f6117ae21960e975e211 (patch)
tree93254aa5f14f6da95b0217738a82233d4b104986 /ui.c
parentAdd general key bindings paragraph to manual (diff)
downloadcatgirl-2aa2005339750e64a587f6117ae21960e975e211.tar.gz
catgirl-2aa2005339750e64a587f6117ae21960e975e211.zip
Add C-y
This is weechat's binding for it.
Diffstat (limited to '')
-rw-r--r--ui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 65b4760..d946854 100644
--- a/ui.c
+++ b/ui.c
@@ -166,12 +166,14 @@ void uiHide(void) {
 	endwin();
 }
 
-static void disableFlowControl(void) {
+// Gain use of C-q, C-s, C-z, C-y, C-o.
+static void acquireKeys(void) {
 	struct termios term;
 	int error = tcgetattr(STDOUT_FILENO, &term);
 	if (error) err(EX_OSERR, "tcgetattr");
 	term.c_iflag &= ~IXON;
 	term.c_cc[VSUSP] = _POSIX_VDISABLE;
+	term.c_cc[VDSUSP] = _POSIX_VDISABLE;
 	term.c_cc[VDISCARD] = _POSIX_VDISABLE;
 	error = tcsetattr(STDOUT_FILENO, TCSADRAIN, &term);
 	if (error) err(EX_OSERR, "tcsetattr");
@@ -212,7 +214,7 @@ void uiInit(void) {
 	initscr();
 	cbreak();
 	noecho();
-	disableFlowControl();
+	acquireKeys();
 	def_prog_mode();
 	atexit(errExit);
 	colorInit();
@@ -662,6 +664,7 @@ static void keyCtrl(wchar_t ch) {
 		break; case L'L': clearok(curscr, true);
 		break; case L'U': edit(id, EditDeleteHead, 0);
 		break; case L'W': edit(id, EditDeletePrevWord, 0);
+		break; case L'Y': edit(id, EditPaste, 0);
 	}
 }