From d382307613b702a06a2ff3674fdedde1e3741240 Mon Sep 17 00:00:00 2001 From: yasuda Date: Mon, 27 Jun 2022 18:17:00 +0900 Subject: [PATCH] IndentGuidesDisable: Clear `IndentGuides{Even,Odd}` matches --- autoload/indent_guides.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index 482d0ad..237725c 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -86,6 +86,13 @@ function! indent_guides#clear_matches() let l:index += l:index endfor endif + + " Make sure to clear indent guide if remembered match id has gone somehow. + for l:match in getmatches() + if l:match.group =~# '^IndentGuides\v(Even|Odd)$' + call matchdelete(l:match.id) + endif + endfor endfunction "