fix(tui): extend smglr ignores to smglp and smgrp (#16239)

The latter were added for xterm by ncurses 6.3 and are similarly
affected.

Fixes https://github.com/neovim/neovim/issues/16238
This commit is contained in:
Jan Alexander Steffens 2021-11-05 03:36:16 +01:00 committed by GitHub
parent 5ce35abae6
commit 3ba800f153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1663,6 +1663,14 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, const char *col
ILOG("Disabling smglr with TERM=xterm for non-xterm.");
unibi_set_str(ut, unibi_set_lr_margin, NULL);
}
if (unibi_get_str(ut, unibi_set_left_margin_parm)) {
ILOG("Disabling smglp with TERM=xterm for non-xterm.");
unibi_set_str(ut, unibi_set_left_margin_parm, NULL);
}
if (unibi_get_str(ut, unibi_set_right_margin_parm)) {
ILOG("Disabling smgrp with TERM=xterm for non-xterm.");
unibi_set_str(ut, unibi_set_right_margin_parm, NULL);
}
}
#ifdef WIN32
@ -1687,6 +1695,14 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, const char *col
ILOG("Disabling smglr with TERM=screen.xterm for screen.");
unibi_set_str(ut, unibi_set_lr_margin, NULL);
}
if (unibi_get_str(ut, unibi_set_left_margin_parm)) {
ILOG("Disabling smglp with TERM=screen.xterm for screen.");
unibi_set_str(ut, unibi_set_left_margin_parm, NULL);
}
if (unibi_get_str(ut, unibi_set_right_margin_parm)) {
ILOG("Disabling smgrp with TERM=screen.xterm for screen.");
unibi_set_str(ut, unibi_set_right_margin_parm, NULL);
}
} else if (tmux) {
unibi_set_if_empty(ut, unibi_to_status_line, "\x1b_");
unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\");