Skip to content

Commit 5c4b597

Browse files
committed
vim: update termguicolor restrictions
Require Neovim v0.3.2+. neovim/neovim@98eaf60 Require Vim v8.1.0839+ with +vcon feature on Windows. vim/vim@f58d81a
1 parent f8ac0e9 commit 5c4b597

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

shared.vim

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,17 @@ if has('syntax')
371371
endif
372372

373373
function! s:set_color()
374-
if has('termguicolors') &&
375-
\ (has('nvim') || !has('win32') || !has('patch-8.0.1531') || has('vcon'))
376-
let &termguicolors = &t_Co == 256 && empty($TMUX) && !has('osx') &&
377-
\ (has('nvim') || has('patch-8.0.0146'))
374+
if has('termguicolors')
375+
\ && (has('nvim')
376+
\ || !has('win32')
377+
\ || !has('patch-8.0.1531')
378+
\ || has('vcon'))
379+
let &termguicolors = &t_Co == 256 && empty($TMUX) && !has('osx')
380+
\ && (has('nvim')
381+
\ ? has('nvim-0.3.2')
382+
\ : (has('win32')
383+
\ ? (has('vcon') && has('patch-8.1.0839'))
384+
\ : has('patch-8.0.0146')))
378385
endif
379386

380387
if s:is_gui

0 commit comments

Comments
 (0)