README.md: Fix bug in sample code for overriding onedark.vim highlights.

has("gui") checks that Vim was compiled with GUI support, while
has("gui_running") checks that vim is running in GUI mode
(the correct feature to check.)

Fixes #103.
This commit is contained in:
Josh Dick
2017-05-23 17:36:55 -04:00
parent b5827a2842
commit de274b785e

View File

@@ -162,7 +162,7 @@ For example, to remove the background color only when running in terminals (outs
" `gui` is the hex color code used in GUI mode/nvim true-color mode
" `cterm` is the color code used in 256-color mode
" `cterm16` is the color code used in 16-color mode
if (has("autocmd") && !has("gui"))
if (has("autocmd") && !has("gui_running"))
let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
autocmd ColorScheme * call onedark#set_highlight("Normal", { "fg": s:white }) " No `bg` setting
end