Closed
Description
Somehow loading vim-one, specifically executing hi Normal ...
inside the script, resets background light even if I set it dark.
Below I describe the method to reproduce this problem.
Reprodcution
NeoVim version
NVIM 0.1.7
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20161208-67773-1y796t8/neovim-0.1.7/build/config -I/tmp/neovim-20161208-67773-1y796t8/neovim-0.1.7/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20161208-67773-1y796t8/neovim-0.1.7/build/src/nvim/auto -I/tmp/neovim-20161208-67773-1y796t8/neovim-0.1.7/build/include
Compiled by mnacamura@suzon.local
Optional features included (+) or not (-): +acl +iconv -jemalloc +tui
For differences from Vim, see :help vim-differences
システム vimrc: "$VIM/sysinit.vim"
省略時の $VIM: "/usr/local/Cellar/neovim/0.1.7/share/nvim"
Minimal configuration
> tree .config/nvim
.config/nvim
├── autoload
│ └── plug.vim
├── init.vim
└── plugged
└── vim-one
├── README.md
├── autoload
│ └── airline
│ └── themes
│ └── one.vim
├── colors
│ └── one.vim
└── screenshots
├── insert-dark.png
├── insert-light.png
├── logo.png
├── normal-dark.png
├── normal-light.png
├── one.png
├── replace-dark.png
├── replace-light.png
├── visual-dark.png
└── visual-light.png
8 directories, 15 files
In init.vim
, I put the following:
set tgc " This line is not necessary for reproduction
call plug#begin('~/.config/nvim/plugged')
Plug 'rakr/vim-one'
call plug#end()
set bg=dark
colo one
Then I added some debug messages to color/one.vim
:
diff --git a/colors/one.vim b/colors/one.vim
index b555a8d..0c1e6ea 100644
--- a/colors/one.vim
+++ b/colors/one.vim
@@ -225,7 +225,9 @@ if has('gui_running') || &t_Co == 88 || &t_Co == 256
exec 'hi ' . a:group . ' guifg=#' . a:fg . ' ctermfg=' . <SID>rgb(a:fg)
endif
if a:bg !=? ''
+ if a:group ==# 'Normal' | echom "Before hi Normal ...:" &bg | endif
exec 'hi ' . a:group . ' guibg=#' . a:bg . ' ctermbg=' . <SID>rgb(a:bg)
+ if a:group ==# 'Normal' | echom "After hi Normal ...:" &bg | endif
endif
if a:attr !=? ''
exec 'hi ' . a:group . ' gui=' . l:attr . ' cterm=' . l:attr
@@ -334,7 +336,9 @@ if has('gui_running') || &t_Co == 88 || &t_Co == 256
call <sid>X('WarningMsg', s:hue_5, '', '')
call <sid>X('TooLong', s:hue_5, '', '')
call <sid>X('WildMenu', s:syntax_fg, s:mono_3, '')
+ echom "Before call <SID>X('Normal', ...):" &bg
call <sid>X('Normal', s:syntax_fg, s:syntax_bg, '')
+ echom "After call <SID>X('Normal', ...):" &bg
call <sid>X('SignColumn', '', s:mono_3, '')
call <sid>X('Special', s:hue_2, '', '')
" }}}
Output
> nvim
Before call <SID>X('Normal', ...): dark
Before hi Normal ...: dark
After hi Normal ...: light
After call <SID>X('Normal', ...): light