From 7ac385e1e8c5e5793f9362e986f14b9a9e4e541c Mon Sep 17 00:00:00 2001 From: Steve Melia Date: Sun, 15 May 2016 14:03:49 +0100 Subject: [PATCH 1/2] Highlight whitespace on both BufEnter and WinEnter for e.g. split --- plugin/better-whitespace.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/better-whitespace.vim b/plugin/better-whitespace.vim index 7b4c23d..5c46082 100644 --- a/plugin/better-whitespace.vim +++ b/plugin/better-whitespace.vim @@ -191,7 +191,8 @@ command! CurrentLineWhitespaceOn call CurrentLineWhitespaceOn() " Process auto commands upon load, update local enabled on filetype change autocmd FileType * let b:better_whitespace_enabled = !ShouldSkipHighlight() | call SetupAutoCommands() -autocmd BufWinEnter * call SetupAutoCommands() +autocmd BufEnter * call SetupAutoCommands() +autocmd WinEnter * call SetupAutoCommands() autocmd ColorScheme * call WhitespaceInit() function! s:PerformMatchHighlight(pattern) From 00ee4b7e68f44763959744a8587b66d8806c9af9 Mon Sep 17 00:00:00 2001 From: Steve Melia Date: Mon, 16 May 2016 20:21:38 +0100 Subject: [PATCH 2/2] Issue 45: Two events on one line and change BufEnter back to BufWinEnter --- plugin/better-whitespace.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/better-whitespace.vim b/plugin/better-whitespace.vim index 5c46082..ece91cc 100644 --- a/plugin/better-whitespace.vim +++ b/plugin/better-whitespace.vim @@ -191,8 +191,7 @@ command! CurrentLineWhitespaceOn call CurrentLineWhitespaceOn() " Process auto commands upon load, update local enabled on filetype change autocmd FileType * let b:better_whitespace_enabled = !ShouldSkipHighlight() | call SetupAutoCommands() -autocmd BufEnter * call SetupAutoCommands() -autocmd WinEnter * call SetupAutoCommands() +autocmd WinEnter,BufWinEnter * call SetupAutoCommands() autocmd ColorScheme * call WhitespaceInit() function! s:PerformMatchHighlight(pattern)