aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-12 16:29:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-12 16:29:10 +1200
commitfdf17183dd9284d99914eec869256a65621434ad (patch)
tree2038e6b1510b595a0b4448db72441bdf3b18d8ef
parentb9bb57b2749a1ec565aeb55529703f527d644553 (diff)
downloadvim-quickfix-auto-open-fdf17183dd9284d99914eec869256a65621434ad.tar.gz
vim-quickfix-auto-open-fdf17183dd9284d99914eec869256a65621434ad.zip
Handle :lhelpgrep correctly by doing nothing
-rw-r--r--plugin/quickfix_auto_open.vim11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugin/quickfix_auto_open.vim b/plugin/quickfix_auto_open.vim
index 5ac821b..3b62675 100644
--- a/plugin/quickfix_auto_open.vim
+++ b/plugin/quickfix_auto_open.vim
@@ -19,15 +19,12 @@ function! s:Open(command) abort
" The command starts with 'l', so we'll be opening a location list
if strpart(a:command, 0, 1) ==# 'l'
- " If the command is 'lhelpgrep', we'll need to switch to the help window
- " to open its location list rather than the current window's
- if a:command ==# 'lhelpgrep'
- help
+ " I can't figure out anything sensible to do for the :lhelpgrep command,
+ " but for all the other location window commands, :lwindow is sensible
+ if a:command !=# 'lhelpgrep'
+ lwindow
endif
- " Open location list if there's anything in it
- lwindow
-
" The command did not start with 'l', so we can just open the quickfix
" window, and we're done
else