IndentLine handlings

This commit is contained in:
haya14busa 2016-01-21 16:12:33 +09:00
parent f5ecb99abe
commit 74fc979fe7

View File

@ -359,6 +359,11 @@ function! s:Hinter.modify_env_for_win(winnr) abort
endif
let self.highlight_ids[a:winnr] += [matchadd(self.config.highlight.shade, '\_.*', 100)]
endif
" XXX: other plugins specific handling
if getbufvar('%', 'indentLine_enabled', 0)
silent! syntax clear IndentLine
endif
endfunction
function! s:Hinter.restore_env() abort
@ -379,6 +384,12 @@ function! s:Hinter.restore_env() abort
for id in self.highlight_ids[winnr]
call matchdelete(id)
endfor
" XXX: other plugins specific handling
if getbufvar('%', 'indentLine_enabled', 0) && exists(':IndentLinesEnable') is# 2
call setbufvar('%', 'indentLine_enabled', 0)
:IndentLinesEnable
endif
endfor
catch
call s:throw(v:throwpoint . ' ' . v:exception)