@@ -172,27 +172,23 @@ else
172172 function ! s: HighlightEOLWhitespace ()
173173 call <SID> ClearHighlighting ()
174174 if <SID> ShouldHighlight ()
175- let w: better_whitespace_match_id = matchadd (' ExtraWhitespace' ,
176- \ s: eol_whitespace_pattern , 10 , get (s: , ' better_whitespace_match_id' , -1 ))
175+ let s: match_id = matchadd (' ExtraWhitespace' , s: eol_whitespace_pattern , 10 , get (s: , ' match_id' , -1 ))
177176 endif
178177 endfunction
179178
180179 " Match Whitespace on all lines except the current one
181180 function ! s: HighlightEOLWhitespaceExceptCurrentLine ()
182181 call <SID> ClearHighlighting ()
183182 if <SID> ShouldHighlight ()
184- let w: better_whitespace_match_id = matchadd (' ExtraWhitespace' ,
183+ let s: match_id = matchadd (' ExtraWhitespace' ,
185184 \ ' \%<' . line (' .' ) . ' l' . s: eol_whitespace_pattern .
186- \ ' \|\%>' . line (' .' ) . ' l' . s: eol_whitespace_pattern , 10 , get (s: , ' better_whitespace_match_id ' , -1 ))
185+ \ ' \|\%>' . line (' .' ) . ' l' . s: eol_whitespace_pattern , 10 , get (s: , ' match_id ' , -1 ))
187186 endif
188187 endfunction
189188
190189 " Remove Whitespace matching
191190 function ! s: ClearHighlighting ()
192- let match_id = get (w: , ' better_whitespace_match_id' , -1 )
193- if match_id >= 0
194- call matchdelete (match_id)
195- endif
191+ silent ! call matchdelete (get (s: , ' match_id' , -1 ))
196192 endfunction
197193endif
198194
0 commit comments