diff options
author | James McCoy <jamessan@jamessan.com> | 2020-04-15 08:06:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 08:06:59 -0400 |
commit | e11e93d1394df83a93c83de5b60639f5085d69dd (patch) | |
tree | c0b605576f64f155d076a09b9f043617f82cc5d3 | |
parent | 979b7c0a73c147dafb51349150cbb120ce0881d1 (diff) | |
parent | c2d288e293a8fa8acba72d73a825213b8a1d280c (diff) | |
download | rneovim-e11e93d1394df83a93c83de5b60639f5085d69dd.tar.gz rneovim-e11e93d1394df83a93c83de5b60639f5085d69dd.tar.bz2 rneovim-e11e93d1394df83a93c83de5b60639f5085d69dd.zip |
Merge pull request #12005 from erw7/fix-screen-vsplit
Closes #11998
-rw-r--r-- | src/nvim/tui/terminfo.c | 5 | ||||
-rw-r--r-- | src/nvim/tui/tui.c | 5 |
2 files changed, 9 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) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 2a64b25a17..0c330149d0 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1637,6 +1637,11 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, // per the screen manual; 2017-04 terminfo.src lacks these. unibi_set_if_empty(ut, unibi_to_status_line, "\x1b_"); unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\"); + // Fix an issue where smglr is inherited by TERM=screen.xterm. + if (unibi_get_str(ut, unibi_set_lr_margin)) { + ILOG("Disabling smglr with TERM=screen.xterm for screen."); + unibi_set_str(ut, unibi_set_lr_margin, NULL); + } } else if (tmux) { unibi_set_if_empty(ut, unibi_to_status_line, "\x1b_"); unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\"); |