From 8b64a77144a87fbc9efe5535979ac612dc8e1f1b Mon Sep 17 00:00:00 2001 From: erw7 Date: Thu, 12 Mar 2020 15:16:25 +0900 Subject: Fix splitting issue on gnu screen gnu screen does not have smglr, but it inherits smglr from xterm and splitting will cause drawing problems. So disable smglr. --- src/nvim/tui/tui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 22f4501be2..3e02910996 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1631,6 +1631,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\\"); -- cgit From c2d288e293a8fa8acba72d73a825213b8a1d280c Mon Sep 17 00:00:00 2001 From: erw7 Date: Thu, 12 Mar 2020 18:36:17 +0900 Subject: Fix screen terminal family issues --- src/nvim/tui/terminfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit