diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index 54c4f8f..32c1896 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -106,8 +106,8 @@ endfunction " gVim when colors can't be automatically calculated. " function! indent_guides#basic_highlight_colors() abort - let l:cterm_colors = (&g:background == 'dark') ? ['darkgrey', 'black'] : ['lightgrey', 'white'] - let l:gui_colors = (&g:background == 'dark') ? ['grey15', 'grey30'] : ['grey70', 'grey85'] + let l:cterm_colors = (&g:background ==# 'dark') ? ['darkgrey', 'black'] : ['lightgrey', 'white'] + let l:gui_colors = (&g:background ==# 'dark') ? ['grey15', 'grey30'] : ['grey70', 'grey85'] exe 'hi IndentGuidesEven guibg=' . l:gui_colors[0] . ' guifg=' . l:gui_colors[1] . ' ctermbg=' . l:cterm_colors[0] . ' ctermfg=' . l:cterm_colors[1] exe 'hi IndentGuidesOdd guibg=' . l:gui_colors[1] . ' guifg=' . l:gui_colors[0] . ' ctermbg=' . l:cterm_colors[1] . ' ctermfg=' . l:cterm_colors[0] @@ -153,7 +153,7 @@ endfunction function! indent_guides#lighten_or_darken_color(color) abort let l:new_color = '' - if (&g:background == 'dark') + if (&g:background ==# 'dark') let l:new_color = color_helper#hex_color_lighten(a:color, s:change_percent) else let l:new_color = color_helper#hex_color_darken (a:color, s:change_percent) diff --git a/plugin/indent_guides.vim b/plugin/indent_guides.vim index 6dd734a..346a8b4 100644 --- a/plugin/indent_guides.vim +++ b/plugin/indent_guides.vim @@ -67,7 +67,7 @@ if !exists('g:indent_guides_exclude_filetypes') endif " Default mapping -if !hasmapto('IndentGuidesToggle', 'n') && maparg('ig', 'n') == '' +if !hasmapto('IndentGuidesToggle', 'n') && maparg('ig', 'n') ==# '' \ && g:indent_guides_default_mapping != 0 nmap ig IndentGuidesToggle endif