From f7d193010900dd6fbb3c88b5863f18050f891c40 Mon Sep 17 00:00:00 2001 From: Greg Hurrell Date: Fri, 5 Oct 2018 20:28:24 +0200 Subject: [PATCH] Check for buffer variable existence before accessing Closes: https://github.com/Yggdroot/indentLine/issues/252 --- after/plugin/indentLine.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/after/plugin/indentLine.vim b/after/plugin/indentLine.vim index 8e6493c..4ae3fd3 100644 --- a/after/plugin/indentLine.vim +++ b/after/plugin/indentLine.vim @@ -107,8 +107,12 @@ endfunction function! s:ResetConcealOption() if exists("b:indentLine_ConcealOptionSet") && b:indentLine_ConcealOptionSet - let &l:concealcursor = b:indentLine_original_concealcursor - let &l:conceallevel = b:indentLine_original_conceallevel + if exists("b:indentLine_original_concealcursor") + let &l:concealcursor = b:indentLine_original_concealcursor + endif + if exists("b:indentLine_original_conceallevel") + let &l:conceallevel = b:indentLine_original_conceallevel + endif let b:indentLine_ConcealOptionSet = 0 endif endfunction