Enable 24bit mode less often

In particular, Screen and emacs' "ansi-term" behave like neovim in that
they just ignore the sequences, which leads to the terminal rendering
default color (most of the time white) instead.
This commit is contained in:
Fabian Homborg 2016-08-03 01:13:31 +02:00
parent 00cb9ce80a
commit d68320a3c6

View file

@ -34,7 +34,10 @@ if status --is-interactive
# Remove this code when we've made it safer to upgrade fish.
else
# Enable truecolor/24-bit support for select terminals
if not set -q NVIM_LISTEN_ADDRESS # (Neovim will swallow the 24bit sequences, rendering text white)
# Ignore Neovim (in 0.1.4 at least), Screen and emacs' ansi-term as they swallow the sequences, rendering the text white.
if not set -q NVIM_LISTEN_ADDRESS
and not set -q STY
and not string match -q -- 'eterm*' $TERM
and begin
set -q KONSOLE_PROFILE_NAME # KDE's konsole
or string match -q -- "*:*" $ITERM_SESSION_ID # Supporting versions of iTerm2 will include a colon here