aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Müller2023-04-16 17:57:57 +0200
committerWolfgang Müller2023-04-16 17:57:57 +0200
commit79b8f21497f49fbb872b26d0003746287c52f3fb (patch)
tree19c0b59e1b17bc32e449b26f2e4ae7b680671418
parent5674b039087f1aabdccb1d564cb323b71510f503 (diff)
downloadvim-ripgrep-79b8f21497f49fbb872b26d0003746287c52f3fb.tar.gz
Don't open the quickfix list automatically
Some users may not want the quickfix list to open automatically as it diverges from vim's default behaviour. We could add a toggle for this, but there are plugins such as [1] that handle this case more generally, so let's just remove the feature entirely. [1] https://github.com/romainl/vim-qf
-rw-r--r--plugin/vim-ripgrep.vim4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim
index fc1bd58..254a478 100644
--- a/plugin/vim-ripgrep.vim
+++ b/plugin/vim-ripgrep.vim
@@ -36,9 +36,7 @@ fun! s:PerformSearch(args)
silent exe 'grep! ' . l:opts . a:args
- if len(getqflist())
- exe 'copen' | redraw!
- else
+ if !len(getqflist())
cclose | redraw!
echo 'No match found for ' . a:args
endif