Skip to content

Commit d382307

Browse files
committed
IndentGuidesDisable: Clear IndentGuides{Even,Odd} matches
1 parent 765084d commit d382307

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

autoload/indent_guides.vim

+7
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ function! indent_guides#clear_matches()
8686
let l:index += l:index
8787
endfor
8888
endif
89+
90+
" Make sure to clear indent guide if remembered match id has gone somehow.
91+
for l:match in getmatches()
92+
if l:match.group =~# '^IndentGuides\v(Even|Odd)$'
93+
call matchdelete(l:match.id)
94+
endif
95+
endfor
8996
endfunction
9097

9198
"

0 commit comments

Comments
 (0)