diff options
author | C. McEnroe | 2020-02-09 07:09:51 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-09 07:09:56 -0500 |
commit | 2aa2005339750e64a587f6117ae21960e975e211 (patch) | |
tree | 93254aa5f14f6da95b0217738a82233d4b104986 /ui.c | |
parent | cbc6ff2da722df93fdff4df7268128937d6dd9b0 (diff) |
Add C-y
This is weechat's binding for it.
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 7 |
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); } } |