Merge branch 'fix/csa' into master

This commit is contained in:
haya14busa 2014-02-11 19:03:40 +09:00
commit e01bc0305e

View File

@ -2,7 +2,7 @@
" FILE: highlight.vim " FILE: highlight.vim
" AUTHOR: haya14busa " AUTHOR: haya14busa
" Reference: https://github.com/t9md/vim-smalls " Reference: https://github.com/t9md/vim-smalls
" Last Change: 07 Feb 2014. " Last Change: 11 Feb 2014.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -102,14 +102,9 @@ function! EasyMotion#highlight#InitHL(group, colors) " {{{
" Prepare highlighting variables " Prepare highlighting variables
let guihl = printf('guibg=%s guifg=%s gui=%s', a:colors.gui[0], a:colors.gui[1], a:colors.gui[2]) let guihl = printf('guibg=%s guifg=%s gui=%s', a:colors.gui[0], a:colors.gui[1], a:colors.gui[2])
" FIXME: support CSApprox correctly let ctermhl = &t_Co == 256
if !exists('g:CSApprox_loaded') \ ? printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm256[0], a:colors.cterm256[1], a:colors.cterm256[2])
let ctermhl = &t_Co == 256 \ : printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm[0], a:colors.cterm[1], a:colors.cterm[2])
\ ? printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm256[0], a:colors.cterm256[1], a:colors.cterm256[2])
\ : printf('ctermbg=%s ctermfg=%s cterm=%s', a:colors.cterm[0], a:colors.cterm[1], a:colors.cterm[2])
else
let ctermhl = ''
endif
" Create default highlighting group " Create default highlighting group
execute printf('hi default %s %s %s', group_default, guihl, ctermhl) execute printf('hi default %s %s %s', group_default, guihl, ctermhl)
@ -136,6 +131,7 @@ function! EasyMotion#highlight#init() "{{{
call EasyMotion#highlight#InitHL(g:EasyMotion_hl_inc_cursor, s:target_hl_inc_cursor) call EasyMotion#highlight#InitHL(g:EasyMotion_hl_inc_cursor, s:target_hl_inc_cursor)
call EasyMotion#highlight#InitHL(g:EasyMotion_hl_move, s:target_hl_move) call EasyMotion#highlight#InitHL(g:EasyMotion_hl_move, s:target_hl_move)
if exists(':CSApprox') == 2 if exists(':CSApprox') == 2
"TODO: better solution or remove completly
CSApprox! CSApprox!
endif endif
endfunction "}}} endfunction "}}}