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