aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-29 05:55:25 +0800
committerGitHub <noreply@github.com>2024-03-29 05:55:25 +0800
commit00b7428b3bf5c30ccfa8322f7b8452a764a0abd0 (patch)
tree1e7a0cafb6d0398b60a1226fb6c3eda1cf09f554
parent0ebc4de0ff93e4edf853b177eb5b1eb898510423 (diff)
downloadrneovim-00b7428b3bf5c30ccfa8322f7b8452a764a0abd0.tar.gz
rneovim-00b7428b3bf5c30ccfa8322f7b8452a764a0abd0.tar.bz2
rneovim-00b7428b3bf5c30ccfa8322f7b8452a764a0abd0.zip
fix(tui): don't use DECRQSS in screen or tmux (#28086)
They behave strangely when receiving that.
-rw-r--r--src/nvim/tui/tui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index aaa2369e29..d71366b7db 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -370,6 +370,8 @@ static void terminfo_start(TUIData *tui)
: (konsole ? 1 : 0);
bool wezterm = strequal(termprg, "WezTerm");
const char *weztermv = wezterm ? os_getenv("TERM_PROGRAM_VERSION") : NULL;
+ bool screen = terminfo_is_term_family(term, "screen");
+ bool tmux = terminfo_is_term_family(term, "tmux") || !!os_getenv("TMUX");
// truecolor support must be checked before patching/augmenting terminfo
tui->rgb = term_has_truecolor(tui, colorterm);
@@ -411,7 +413,8 @@ static void terminfo_start(TUIData *tui)
// mode 2026
tui_request_term_mode(tui, kTermModeSynchronizedOutput);
- if (tui->unibi_ext.set_underline_style == -1) {
+ // Don't use DECRQSS in screen or tmux, as they behave strangely when receving that.
+ if (tui->unibi_ext.set_underline_style == -1 && !(screen || tmux)) {
// Query the terminal to see if it supports extended underline.
tui_query_extended_underline(tui);
}