aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-10-02 04:07:10 +0200
committerGitHub <noreply@github.com>2019-10-02 04:07:10 +0200
commit8e25cf3881bbc3d65645d1b2abc6fa46863b1765 (patch)
tree609e39731e5859dd536814fdcc7c0fadd43b42df /src
parentb7d6caaa036c3d1be716bb6e4b0f56c08fb8dcf5 (diff)
downloadrneovim-8e25cf3881bbc3d65645d1b2abc6fa46863b1765.tar.gz
rneovim-8e25cf3881bbc3d65645d1b2abc6fa46863b1765.tar.bz2
rneovim-8e25cf3881bbc3d65645d1b2abc6fa46863b1765.zip
patch_terminfo_bugs: TERM=xterm with non-xterm: ignore smglr (#11132)
"smglr" was added for TERM=xterm recently to the terminfo database, which causes display issues with terminals that use `TERM=xterm` by default for themselves, although not supporting it. This patch makes "smglr" to be ignored then. Fixes https://github.com/neovim/neovim/issues/10562
Diffstat (limited to 'src')
-rw-r--r--src/nvim/tui/tui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 4ca44b25f0..956d4eb9da 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -93,7 +93,7 @@ typedef struct {
int out_fd;
bool scroll_region_is_full_screen;
bool can_change_scroll_region;
- bool can_set_lr_margin;
+ bool can_set_lr_margin; // smglr
bool can_set_left_right_margin;
bool can_scroll;
bool can_erase_chars;
@@ -1603,6 +1603,12 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
unibi_set_if_empty(ut, unibi_set_lr_margin, "\x1b[%i%p1%d;%p2%ds");
unibi_set_if_empty(ut, unibi_set_left_margin_parm, "\x1b[%i%p1%ds");
unibi_set_if_empty(ut, unibi_set_right_margin_parm, "\x1b[%i;%p2%ds");
+ } else {
+ // Fix things advertised via TERM=xterm, for non-xterm.
+ if (unibi_get_str(ut, unibi_set_lr_margin)) {
+ ILOG("Disabling smglr with TERM=xterm for non-xterm.");
+ unibi_set_str(ut, unibi_set_lr_margin, NULL);
+ }
}
#ifdef WIN32