From f14d7e609b241611be65828929e9272aceae759c Mon Sep 17 00:00:00 2001 From: Yggdroot Date: Thu, 7 Mar 2013 18:46:35 +0800 Subject: [PATCH] fix issue #16 --- after/plugin/indentLine.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 4b69d83..783cea2 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -33,7 +33,7 @@ if !exists("g:indentLine_fileType") endif if !exists("g:indentLine_fileTypeExclude") - let g:indentLine_fileTypeExclude = [] + let g:indentLine_fileTypeExclude = [] endif set conceallevel=1 @@ -102,7 +102,7 @@ endfunction "{{{1 function! Setup() function! Setup() - if !exists("b:indentLine_set") + if !getbufvar("%","&hidden") || !exists("b:indentLine_set") let b:indentLine_set = 1 if index(g:indentLine_fileTypeExclude, &ft) != -1 @@ -128,8 +128,8 @@ function! Setup() endfunction "{{{1 commands -exec 'autocmd BufWinEnter * call Setup()' -exec 'autocmd BufRead,ColorScheme * call InitColor()' +autocmd BufWinEnter * call Setup() +autocmd BufRead,ColorScheme * call InitColor() command! -nargs=? IndentLinesReset call ResetWidth() command! IndentLinesToggle call IndentLinesToggle()