diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-12 16:39:22 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-12 16:39:22 +1200 |
commit | bc88f5e2c911ad9148bd76a3c78f43e8a878bd76 (patch) | |
tree | a67ce1c75c17c62d2230fcca2508189ab57ba45e | |
parent | Merge branch 'release/v0.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-quickfix-auto-open-bc88f5e2c911ad9148bd76a3c78f43e8a878bd76.tar.gz vim-quickfix-auto-open-bc88f5e2c911ad9148bd76a3c78f43e8a878bd76.zip |
Merge branch 'release/v0.3.0'v0.3.0
* release/v0.3.0:
Remove unneeded variable scoping
Handle :lhelpgrep correctly by doing nothing
Switch to two-spacing
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | doc/quickfix_auto_open.txt | 4 | ||||
-rw-r--r-- | plugin/quickfix_auto_open.vim | 15 |
4 files changed, 10 insertions, 13 deletions
@@ -18,4 +18,4 @@ distribution. License ------- -Distributed under the same terms as Vim itself, probably. See `:help license`. +Distributed under the same terms as Vim itself, probably. See `:help license`. @@ -1 +1 @@ -0.2.0 +0.3.0 diff --git a/doc/quickfix_auto_open.txt b/doc/quickfix_auto_open.txt index 745d882..8d2a083 100644 --- a/doc/quickfix_auto_open.txt +++ b/doc/quickfix_auto_open.txt @@ -7,8 +7,8 @@ quickfix and location lists when a command that changes their contents is run. REQUIREMENTS *quickfix_auto_open-requirements* -This plugin is only available if 'compatible' is not set. It also requires the -|+autocmd| feature. +This plugin is only available if 'compatible' is not set. It also requires +the |+autocmd| feature. AUTHOR *quickfix_auto_open-author* diff --git a/plugin/quickfix_auto_open.vim b/plugin/quickfix_auto_open.vim index 5ac821b..63195da 100644 --- a/plugin/quickfix_auto_open.vim +++ b/plugin/quickfix_auto_open.vim @@ -5,13 +5,13 @@ " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself " -if exists('g:loaded_quickfix_auto_open') || &compatible +if exists('loaded_quickfix_auto_open') || &compatible finish endif if !has('autocmd') || v:version < 700 finish endif -let g:loaded_quickfix_auto_open = 1 +let loaded_quickfix_auto_open = 1 " Open an appropriate quickfix or location list, depending on the command function! s:Open(command) abort @@ -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 |