diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2015-05-27 00:23:26 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-27 10:24:50 -0400 |
commit | 2c9dfddab1027acec2bd2bcf9d9050719e0f54d6 (patch) | |
tree | c77061d8cd13cceb13c68cec038895d4caf833c5 | |
parent | 3dd166b20387607d73fee01507e7c9ddcfa9bcd4 (diff) | |
download | rneovim-2c9dfddab1027acec2bd2bcf9d9050719e0f54d6.tar.gz rneovim-2c9dfddab1027acec2bd2bcf9d9050719e0f54d6.tar.bz2 rneovim-2c9dfddab1027acec2bd2bcf9d9050719e0f54d6.zip |
tui: don't pass NULL to termkey #2747
Closes #2745
-rw-r--r-- | src/nvim/tui/term_input.inl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/tui/term_input.inl b/src/nvim/tui/term_input.inl index ccc47080b8..544fe8b12c 100644 --- a/src/nvim/tui/term_input.inl +++ b/src/nvim/tui/term_input.inl @@ -269,7 +269,11 @@ static TermInput *term_input_new(void) flags |= TERMKEY_FLAG_RAW; } - rv->tk = termkey_new_abstract(os_getenv("TERM"), flags); + const char *term = os_getenv("TERM"); + if (!term) { + term = ""; // termkey_new_abstract assumes non-null (#2745) + } + rv->tk = termkey_new_abstract(term, flags); int curflags = termkey_get_canonflags(rv->tk); termkey_set_canonflags(rv->tk, curflags | TERMKEY_CANON_DELBS); // setup input handle |