From 3ba800f1538e083f8172655c6bab096cd604a0b5 Mon Sep 17 00:00:00 2001 From: Jan Alexander Steffens Date: Fri, 5 Nov 2021 03:36:16 +0100 Subject: [PATCH] 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 --- src/nvim/tui/tui.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index f9c5521bdb..bb75286369 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -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\\");