Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee21fe3

Browse filesBrowse files
committed
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
1 parent 2beb731 commit ee21fe3
Copy full SHA for ee21fe3

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎src/nvim/tui/tui.c

Copy file name to clipboardExpand all lines: src/nvim/tui/tui.c
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,8 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
16071607
} else if (tmux) {
16081608
unibi_set_if_empty(ut, unibi_to_status_line, "\x1b_");
16091609
unibi_set_if_empty(ut, unibi_from_status_line, "\x1b\\");
1610+
unibi_set_if_empty(ut, unibi_enter_italics_mode, "\x1b[3m");
1611+
unibi_set_if_empty(ut, unibi_exit_italics_mode, "\x1b[23m");
16101612
} else if (terminfo_is_term_family(term, "interix")) {
16111613
// 2017-04 terminfo.src lacks this.
16121614
unibi_set_if_empty(ut, unibi_carriage_return, "\x0d");

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.