mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
TUI: force italics in tmux
tmux users are encouraged to use "tmux-256color" instead of the old "screen-256color". Put this in your .tmux.conf : if-shell 'infocmp tmux-256color' 'set -g default-terminal "tmux-256color"' 'set -g default-terminal "screen-256color"' If default-terminal is "tmux-256color" AND tmux finds its terminfo, THEN it will enable italics (regardless of whether the terminfo contains sitm/ritm). OTHERWISE tmux "emulates screen", which means it emits italics as "reverse". That's unfortunate, but it's an acceptable compromise that allows Nvim to support italics in tmux by default in compatible (and increasingly-common) configurations. Test case: tmux nvim -u NORC +'hi Comment cterm=italic' CMakeLists.txt ref #9598
This commit is contained in:
parent
2beb731ed4
commit
ee21fe3d2a
@ -1607,6 +1607,8 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
|
||||
} else if (tmux) {
|
||||
unibi_set_if_empty(ut, unibi_to_status_line, "\x1b_");
|
||||
unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\");
|
||||
unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");
|
||||
unibi_set_if_empty(ut, unibi_exit_italics_mode, "\x1b[23m");
|
||||
} else if (terminfo_is_term_family(term, "interix")) {
|
||||
// 2017-04 terminfo.src lacks this.
|
||||
unibi_set_if_empty(ut, unibi_carriage_return, "\x0d");
|
||||
|
Loading…
Reference in New Issue
Block a user