[vim] Update setqflist example

Without 'lnum', cfdo doesn't work

Close https://github.com/junegunn/fzf.vim/issues/1435
This commit is contained in:
Junegunn Choi 2023-03-10 22:20:57 +09:00
parent 63cf9d04de
commit 1116e481be
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ let g:fzf_action = {
" An action can be a reference to a function that processes selected lines
function! s:build_quickfix_list(lines)
call setqflist(map(copy(a:lines), '{ "filename": v:val }'))
call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }'))
copen
cc
endfunction

View File

@ -143,7 +143,7 @@ Examples~
" An action can be a reference to a function that processes selected lines
function! s:build_quickfix_list(lines)
call setqflist(map(copy(a:lines), '{ "filename": v:val }'))
call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }'))
copen
cc
endfunction