Skip to content

Commit 7e17c6d

Browse files
committed
Add excluded syntax group
1 parent b046e91 commit 7e17c6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/better-whitespace.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ function! <SID>SetupAutoCommands()
233233
" Highlight extraneous whitespace at the end of lines, but not the
234234
" current line.
235235
call s:InAllWindows('syn clear ExtraWhitespace | syn match ExtraWhitespace excludenl /\s\+$/')
236-
autocmd InsertEnter * syn clear ExtraWhitespace | syn match ExtraWhitespace excludenl /\s\+\%#\@!$/ containedin=ALL
237-
autocmd InsertLeave,BufReadPost * syn clear ExtraWhitespace | syn match ExtraWhitespace excludenl /\s\+$/ containedin=ALL
236+
autocmd InsertEnter * syn clear ExtraWhitespace | syn match ExtraWhitespace excludenl /\s\+\%#\@!$/ containedin=ALLBUT,gitcommitDiff
237+
autocmd InsertLeave,BufReadPost * syn clear ExtraWhitespace | syn match ExtraWhitespace excludenl /\s\+$/ containedin=ALLBUT,gitcommitDiff
238238
endif
239239
endif
240240

0 commit comments

Comments
 (0)