aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-02-11 20:27:13 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-02-12 08:09:21 +0100
commit1083c626b9a3fc858c552d38250c3c555cda4074 (patch)
tree83d92c29f4976f2e6bfb300e7c5ae31da64ee955
parent1b746c0ea970f1f299808d7f2715b41944e18096 (diff)
downloadrneovim-1083c626b9a3fc858c552d38250c3c555cda4074.tar.gz
rneovim-1083c626b9a3fc858c552d38250c3c555cda4074.tar.bz2
rneovim-1083c626b9a3fc858c552d38250c3c555cda4074.zip
TUI: assume italics support in all xterm-likes
https://github.com/neovim/neovim/issues/9598#issuecomment-462421302 > On systems other than macOS, terminfo always has them set. It's part > of the ANSI standard SGR codes
-rw-r--r--src/nvim/tui/tui.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index dfb8990b46..bbf2306f90 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1517,7 +1517,6 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
bool alacritty = terminfo_is_term_family(term, "alacritty");
// None of the following work over SSH; see :help TERM .
bool iterm_pretending_xterm = xterm && iterm_env;
- bool konsole_pretending_xterm = xterm && konsolev;
bool gnome_pretending_xterm = xterm && colorterm
&& strstr(colorterm, "gnome-terminal");
bool mate_pretending_xterm = xterm && colorterm
@@ -1571,11 +1570,12 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
// claim to be xterm. Or they would mimic xterm properly enough to be
// treatable as xterm.
- // 2017-04 terminfo.src lacks these. genuine Xterm has them, as have
- // the false claimants.
+ // 2017-04 terminfo.src lacks these. Xterm-likes have them.
unibi_set_if_empty(ut, unibi_to_status_line, "\x1b]0;");
unibi_set_if_empty(ut, unibi_from_status_line, "\x07");
unibi_set_if_empty(ut, unibi_set_tb_margin, "\x1b[%i%p1%d;%p2%dr");
+ unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");
+ unibi_set_if_empty(ut, unibi_exit_italics_mode, "\x1b[23m");
if (true_xterm) {
// 2017-04 terminfo.src lacks these. genuine Xterm has them.
@@ -1583,15 +1583,6 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
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");
}
- if (true_xterm
- || iterm_pretending_xterm
- || gnome_pretending_xterm
- || konsole_pretending_xterm
- || nsterm) {
- // Apple's outdated copy of terminfo.src for MacOS lacks these.
- unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");
- unibi_set_if_empty(ut, unibi_exit_italics_mode, "\x1b[23m");
- }
} else if (rxvt) {
// 2017-04 terminfo.src lacks these. Unicode rxvt has them.
unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");