1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

Fix flygrep (#4361)

This commit is contained in:
Wang Shidong 2021-08-07 14:10:47 +08:00 committed by GitHub
parent 4740d02199
commit 38955b7d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -46,8 +46,10 @@ main () {
_detect autoload/SpaceVim/api/data/dict.vim
_detect autoload/SpaceVim/api/data/list.vim
_detect autoload/SpaceVim/api/data/json.vim
_detect autoload/SpaceVim/api/data/string.vim
_detect autoload/SpaceVim/api/prompt.vim
_detect autoload/SpaceVim/api/job.vim
_detect autoload/SpaceVim/api/vim.vim
_detect autoload/SpaceVim/api/file.vim
_detect autoload/SpaceVim/api/system.vim
_detect autoload/SpaceVim/mapping/search.vim

View File

@ -14,7 +14,7 @@ let s:SYS = SpaceVim#api#import('system')
let s:BUFFER = SpaceVim#api#import('vim#buffer')
let s:LIST = SpaceVim#api#import('data#list')
let s:REGEX = SpaceVim#api#import('vim#regex')
let s:VIM = SpaceVim#api#import('vim')
let s:LOGGER =SpaceVim#logger#derive('FlyGrep')
let s:HI = SpaceVim#api#import('vim#highlight')
if has('nvim')
@ -860,7 +860,7 @@ function! SpaceVim#plugins#flygrep#open(argv) abort
call s:matchadd('FileName', s:filename_pattern, 3)
let s:MPT._prompt.begin = get(a:argv, 'input', '')
let fs = get(a:argv, 'files', '')
if fs ==# '@buffers'
if !s:VIM.is_list(fs) && fs ==# '@buffers'
let s:grep_files = map(s:BUFFER.listed_buffers(), 'bufname(v:val)')
elseif !empty(fs)
let s:grep_files = fs