aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2020-03-12 18:36:17 +0900
committererw7 <erw7.github@gmail.com>2020-03-12 18:36:17 +0900
commitc2d288e293a8fa8acba72d73a825213b8a1d280c (patch)
tree76d9063a852eab0adcea0f28a76b73dd610f3e0f
parent8b64a77144a87fbc9efe5535979ac612dc8e1f1b (diff)
downloadrneovim-c2d288e293a8fa8acba72d73a825213b8a1d280c.tar.gz
rneovim-c2d288e293a8fa8acba72d73a825213b8a1d280c.tar.bz2
rneovim-c2d288e293a8fa8acba72d73a825213b8a1d280c.zip
Fix screen terminal family issues
-rw-r--r--src/nvim/tui/terminfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/tui/terminfo.c b/src/nvim/tui/terminfo.c
index 7dfe7ab953..ff2a357752 100644
--- a/src/nvim/tui/terminfo.c
+++ b/src/nvim/tui/terminfo.c
@@ -31,7 +31,10 @@ bool terminfo_is_term_family(const char *term, const char *family)
return tlen >= flen
&& 0 == memcmp(term, family, flen)
// Per commentary in terminfo, minus is the only valid suffix separator.
- && ('\0' == term[flen] || '-' == term[flen]);
+ // The screen terminfo may have a terminal name like screen.xterm. By making
+ // the dot(.) a valid separator, such terminal names will also be the
+ // terminal family of the screen.
+ && ('\0' == term[flen] || '-' == term[flen] || '.' == term[flen]);
}
bool terminfo_is_bsd_console(const char *term)