diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-01-14 15:12:10 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-01-14 15:17:49 +0100 |
commit | 7a8cbcda064e8231e56eb1495d5a7d4585f1273d (patch) | |
tree | 2f0eec1cd0ca02c46bb3f033fd9d82c8c65933ca /share/functions/__fish_config_interactive.fish | |
parent | 8e79da3b2ddb617c526775e1b960165d4cb5674a (diff) |
Disable 24bit-color on neovim's terminal
Unfortunately, nvim will, even when running in a terminal that supports
it, swallow the sequences whole, rendering the displayed text _white_.
This means falling back to 256 colors is the lesser evil as at least a
blue-ish color will display as blue while a red-ish will be red, instead
of both showing white.
nvim's behavior does _not_ change depending on
$NVIM_TUI_ENABLE_TRUE_COLOR or any other option I could find and neovim-qt
exhibits the same behavior.
Fixes #2600.
Diffstat (limited to 'share/functions/__fish_config_interactive.fish')
-rw-r--r-- | share/functions/__fish_config_interactive.fish | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 314e265f..0dbd3ee1 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -286,12 +286,14 @@ function __fish_config_interactive -d "Initializations that should be performed end end - if 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 - or string match -q -- "st-*" $TERM # suckless' st - or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0 - or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this - end - set -g fish_term24bit 1 + if not set -q NVIM_LISTEN_ADDRESS # Neovim will swallow the 24bit sequences, rendering text white + 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 + or string match -q -- "st-*" $TERM # suckless' st + or test "$VTE_VERSION" -ge 3600 # Should be all gtk3-vte-based terms after version 3.6.0.0 + or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this + end + set -g fish_term24bit 1 end end |