From 41fb611a355514c9493cc6448101505041a6e453 Mon Sep 17 00:00:00 2001 From: Yggdroot Date: Wed, 21 Jan 2015 16:41:32 +0800 Subject: [PATCH] fix issue #103 --- after/plugin/indentLine.vim | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index a1e7553..5b1eec6 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -116,10 +116,11 @@ endfunction "{{{1 function! s:IndentLinesDisable() function! s:IndentLinesDisable() - if exists("b:indentLine_enabled") && b:indentLine_enabled - let b:indentLine_enabled = 0 + let b:indentLine_enabled = 0 + try syntax clear IndentLine - endif + catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 + endtry endfunction "{{{1 function! s:IndentLinesToggle() @@ -189,10 +190,11 @@ endfunction "{{{1 function! s:LeadingSpaceDisable() function! s:LeadingSpaceDisable() - if exists("b:indentLine_leadingSpaceEnabled") && b:indentLine_leadingSpaceEnabled - let b:indentLine_leadingSpaceEnabled = 0 + let b:indentLine_leadingSpaceEnabled = 0 + try syntax clear IndentLineLeadingSpace - endif + catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 + endtry endfunction "{{{1 function! s:LeadingSpaceToggle()