Skip to content

Commit

Permalink
merge: cite context ensure root path
Browse files Browse the repository at this point in the history
refer: #1974
  • Loading branch information
lervag committed Mar 4, 2021
2 parents 8d6496a + 2a8f880 commit 43c16cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload/vimtex/context/cite.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ endfunction

" }}}1
function! s:handler.get_actions() abort dict " {{{1
" Ensure we're at the root directory when locating bib files
call vimtex#paths#pushd(b:vimtex.root)
let l:entries = []
for l:file in vimtex#bib#files()
let l:entries += vimtex#parser#bib(l:file, {'backend': 'vim'})
endfor
call vimtex#paths#popd()

let l:entry = get(
\ filter(copy(l:entries), {_, x -> x.key ==# self.selected}), 0, {})
Expand Down

0 comments on commit 43c16cd

Please sign in to comment.