aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui/input.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-12-12 06:50:39 +0100
committerJustin M. Keyes <justinkz@gmail.com>2016-12-23 18:28:54 +0100
commitaf2e629be4d20dda334a7c6ca817f5599956e4ff (patch)
treef6c67f44df2ef665472f773c199ec6f30d5e50c9 /src/nvim/tui/input.c
parentf1bfd055a7f461fd6c3770b28d08b922838ee6b0 (diff)
downloadrneovim-af2e629be4d20dda334a7c6ca817f5599956e4ff.tar.gz
rneovim-af2e629be4d20dda334a7c6ca817f5599956e4ff.tar.bz2
rneovim-af2e629be4d20dda334a7c6ca817f5599956e4ff.zip
tui: check stty/termios for kbs
Requires libtermkey 0.19+ Closes #2048 Closes #5693 See https://github.com/neovim/libtermkey/compare/a9b61424aae9f7548162ff112393c5f706cf54f1%5E...c0eb4e4a05f49ad8fee0195c77f2c29d09cc36af See https://bugzilla.redhat.com/show_bug.cgi?id=142659 See https://github.com/tmux/tmux/blob/fe4e9470bb504357d073320f5d305b22663ee3fd/tty-keys.c#L625-L632
Diffstat (limited to 'src/nvim/tui/input.c')
-rw-r--r--src/nvim/tui/input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 70d87a7ab2..8e5adb14f9 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -32,7 +32,14 @@ void term_input_init(TermInput *input, Loop *loop)
term = ""; // termkey_new_abstract assumes non-null (#2745)
}
+#if TERMKEY_VERSION_MAJOR > 0 || TERMKEY_VERSION_MINOR > 18
+ input->tk = termkey_new_abstract(term,
+ TERMKEY_FLAG_UTF8 | TERMKEY_FLAG_NOSTART);
+ termkey_hook_terminfo_getstr(input->tk, input->tk_ti_hook_fn, NULL);
+ termkey_start(input->tk);
+#else
input->tk = termkey_new_abstract(term, TERMKEY_FLAG_UTF8);
+#endif
int curflags = termkey_get_canonflags(input->tk);
termkey_set_canonflags(input->tk, curflags | TERMKEY_CANON_DELBS);