File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ endif
120120function ! s: ShouldHighlight ()
121121 " Guess from the filetype if a) not locally decided, b) globally enabled, c) there is enough information
122122 if ! exists (' b:better_whitespace_enabled' ) && g: better_whitespace_enabled == 1 && ! (empty (&buftype ) && empty (&filetype ))
123- let b: better_whitespace_enabled = &buftype != ' nofile' && index (g: better_whitespace_filetypes_blacklist , &ft ) == -1
123+ let b: better_whitespace_enabled = &buftype != ' nofile' && & buftype != ' popup ' && index (g: better_whitespace_filetypes_blacklist , &ft ) == -1
124124 endif
125125 return get (b: , ' better_whitespace_enabled' , g: better_whitespace_enabled )
126126endfunction
@@ -341,7 +341,7 @@ function! <SID>SetupAutoCommands()
341341
342342 if g: current_line_whitespace_disabled_soft == 0
343343 " Using syntax: clear whitespace highlighting when leaving buffer
344- autocmd BufWinLeave * call <SID> ClearHighlighting ()
344+ autocmd BufWinLeave * if expand ( " <afile> " ) == expand ( " % " ) | call <SID> ClearHighlighting () | endif
345345
346346 " Do not highlight whitespace on current line in insert mode
347347 autocmd CursorMovedI * call <SID> HighlightEOLWhitespaceExceptCurrentLine ()
You can’t perform that action at this time.
0 commit comments