aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz CzapliƄski <czapkofan@gmail.com>2016-06-12 04:56:37 +0000
committerJustin M. Keyes <justinkz@gmail.com>2016-06-12 00:56:37 -0400
commite247e3acdd3e3559af2a24dd4b7092f02d4afbcb (patch)
treeaad5532b90b1599613966d95d9f553638a4d0398
parente7ab3e7e591c739688bef99e3855b3ef232cdb66 (diff)
downloadrneovim-e247e3acdd3e3559af2a24dd4b7092f02d4afbcb.tar.gz
rneovim-e247e3acdd3e3559af2a24dd4b7092f02d4afbcb.tar.bz2
rneovim-e247e3acdd3e3559af2a24dd4b7092f02d4afbcb.zip
tui/input.c: Handle Ctrl-Z (suspend) for TERM=linux (#3100) (#4911)
Fix #3100. On virtual consoles (Alt-F1, etc.), the Ctrl-Z combination was lost.
-rw-r--r--src/nvim/tui/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 3a136a4b1d..be256f3ebc 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -139,6 +139,9 @@ static void forward_modified_utf8(TermInput *input, TermKeyKey *key)
if (key->type == TERMKEY_TYPE_KEYSYM
&& key->code.sym == TERMKEY_SYM_ESCAPE) {
len = (size_t)snprintf(buf, sizeof(buf), "<Esc>");
+ } else if (key->type == TERMKEY_TYPE_KEYSYM
+ && key->code.sym == TERMKEY_SYM_SUSPEND) {
+ len = (size_t)snprintf(buf, sizeof(buf), "<C-Z>");
} else {
len = termkey_strfkey(input->tk, buf, sizeof(buf), key, TERMKEY_FORMAT_VIM);
}