aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-19 11:54:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-19 11:54:46 +1200
commit295a71a8dd2a5384f3d30cf64713370fe8df5127 (patch)
tree20c3baabdd506766739e6a737f72dcec41fc9d26
parentMerge branch 'release/v2.1.0' (diff)
parentUpdate documentation date (diff)
downloadvim-quickfix-auto-open-2.2.0.tar.gz (sig)
vim-quickfix-auto-open-2.2.0.zip
Merge branch 'release/v2.2.0'v2.2.0
* release/v2.2.0: Update documentation date Refactor to avoid autoloading :lhelpgrep handler
-rw-r--r--VERSION2
-rw-r--r--autoload/quickfix_auto_open.vim11
-rw-r--r--doc/quickfix_auto_open.txt2
-rw-r--r--plugin/quickfix_auto_open.vim6
4 files changed, 10 insertions, 11 deletions
diff --git a/VERSION b/VERSION
index 7ec1d6d..ccbccc3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.0
+2.2.0
diff --git a/autoload/quickfix_auto_open.vim b/autoload/quickfix_auto_open.vim
index c578d0c..a190c34 100644
--- a/autoload/quickfix_auto_open.vim
+++ b/autoload/quickfix_auto_open.vim
@@ -1,5 +1,5 @@
-" Handle a quickfix command
-function! quickfix_auto_open#(command) abort
+" Handle a local quickfix command
+function! quickfix_auto_open#Local(command) abort
" The only difficult quickfix command to handle is :lhelpgrep, because it
" uses the location list not for the current window but for a :help window,
@@ -12,14 +12,11 @@ function! quickfix_auto_open#(command) abort
" it to check its location and the presence of a location list, and open
" it up if so; then remove the hook
autocmd quickfix_auto_open BufEnter *
- \ call s:Help(bufnr('%'))
- \|autocmd! quickfix_auto_open BufEnter
+ \ call s:Help(bufnr('%')) | autocmd! quickfix_auto_open BufEnter
" All of the rest of the commands are really easy:
- elseif a:command =~# '^l'
- lwindow " Command started with 'l', open this window's location list
else
- cwindow " Command didn't start with 'l', open the quickfix list
+ lwindow
endif
endfunction
diff --git a/doc/quickfix_auto_open.txt b/doc/quickfix_auto_open.txt
index d0015db..23957fb 100644
--- a/doc/quickfix_auto_open.txt
+++ b/doc/quickfix_auto_open.txt
@@ -1,4 +1,4 @@
-*quickfix_auto_open.txt* For Vim version 7.0 Last change: 2019 Jun 17
+*quickfix_auto_open.txt* For Vim version 7.0 Last change: 2019 Jun 19
DESCRIPTION *quickfix_auto_open*
diff --git a/plugin/quickfix_auto_open.vim b/plugin/quickfix_auto_open.vim
index c9473c4..65006fa 100644
--- a/plugin/quickfix_auto_open.vim
+++ b/plugin/quickfix_auto_open.vim
@@ -13,8 +13,10 @@ let loaded_quickfix_auto_open = 1
" 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*
+ \ call quickfix_auto_open#(expand('<amatch>'))
augroup END