aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-04 13:57:52 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-04 13:57:52 +1200
commitec39dea7ae43434cc8fabc6f05cb2db81d816a67 (patch)
tree448e4c40375b9f2e6647ced62420547d0e1d7bb6 /plugin
parentSimplify back to romainl's original commands (diff)
downloadvim-quickfix-auto-open-ec39dea7ae43434cc8fabc6f05cb2db81d816a67.tar.gz
vim-quickfix-auto-open-ec39dea7ae43434cc8fabc6f05cb2db81d816a67.zip
Make :lhelpgrep work with a deferred autocmd
Diffstat (limited to 'plugin')
-rw-r--r--plugin/quickfix_auto_open.vim10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugin/quickfix_auto_open.vim b/plugin/quickfix_auto_open.vim
index 73b3f4b..507dff3 100644
--- a/plugin/quickfix_auto_open.vim
+++ b/plugin/quickfix_auto_open.vim
@@ -10,13 +10,11 @@ if exists('loaded_quickfix_auto_open') || &compatible || v:version < 700
endif
let loaded_quickfix_auto_open = 1
-" Set up hooks in self-clearing group
+" Set up hooks for events that may yield a populated quickfix or location list
augroup quickfix_auto_open
autocmd!
+ autocmd QuickFixCmdPost *
+ \ call quickfix_auto_open#(expand('<amatch>'))
autocmd VimEnter *
- \ cwindow
- autocmd QuickFixCmdPost [^l]*
- \ cwindow
- autocmd QuickFixCmdPost l*
- \ lwindow
+ \ doautocmd quickfix_auto_open QuickFixCmdPost
augroup END