Skip to content

Commit 24dc655

Browse files
committed
Fix the quickui menu become colorless after use command like: colorscheme, set bg.
1 parent ec01510 commit 24dc655

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

plugin/quickui.vim

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"======================================================================
22
"
3-
" quickui.vim -
3+
" quickui.vim -
44
"
55
" Created by skywind on 2019/12/26
66
" Last Modified: 2019/12/26 18:20:52
@@ -39,6 +39,17 @@ function! s:hilink(name, target)
3939
endif
4040
endfunc
4141

42+
function! s:set_quickui_hi()
43+
" hi! QuickDefaultSel ctermbg=
44+
hi! link QuickBG QuickDefaultBackground
45+
hi! link QuickSel QuickDefaultSel
46+
hi! link QuickKey QuickDefaultKey
47+
hi! link QuickOff QuickDefaultDisable
48+
hi! link QuickHelp QuickDefaultHelp
49+
hi! link QuickBorder QuickDefaultBorder
50+
hi! link QuickTermBorder QuickDefaultTermBorder
51+
hi! link QuickPreview QuickDefaultPreview
52+
endfunc
4253

4354
function! QuickThemeChange(theme)
4455
let theme = 'borland'
@@ -52,7 +63,7 @@ function! QuickThemeChange(theme)
5263
let theme = 'gruvbox'
5364
elseif a:theme == 'solarized'
5465
let theme = 'solarized'
55-
elseif a:theme == 'papercol' || a:theme == 'papercol-dark'
66+
elseif a:theme == 'papercol' || a:theme == 'papercol-dark'
5667
let theme = 'papercol_dark'
5768
elseif a:theme == 'papercol dark'
5869
let theme = 'papercol_dark'
@@ -68,6 +79,7 @@ function! QuickThemeChange(theme)
6879
if filereadable(s:fname)
6980
exec "source " . fnameescape(s:fname)
7081
endif
82+
call s:set_quickui_hi()
7183
endfunc
7284

7385
let s:scheme = get(g:, 'quickui_color_scheme', '')
@@ -78,14 +90,4 @@ augroup quickui "{{{
7890
autocmd Colorscheme * call QuickThemeChange(get(g:, 'quickui_color_scheme', ''))
7991
augroup END "}}}
8092

81-
" hi! QuickDefaultSel ctermbg=
82-
call s:hilink('QuickBG', 'QuickDefaultBackground')
83-
call s:hilink('QuickSel', 'QuickDefaultSel')
84-
call s:hilink('QuickKey', 'QuickDefaultKey')
85-
call s:hilink('QuickOff', 'QuickDefaultDisable')
86-
call s:hilink('QuickHelp', 'QuickDefaultHelp')
87-
call s:hilink('QuickBorder', 'QuickDefaultBorder')
88-
call s:hilink('QuickTermBorder', 'QuickDefaultTermBorder')
89-
call s:hilink('QuickPreview', 'QuickDefaultPreview')
90-
91-
93+
call s:set_quickui_hi()

0 commit comments

Comments
 (0)