From 11aee0ba822c71655863bce0e5422f5238479b5e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 28 Jul 2021 15:53:56 -0400 Subject: [PATCH] Fix incorrect readfile() arguments --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c2aa0cc..2ca5e51 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2671,7 +2671,7 @@ function! s:RunEdit(state, tmp, job) abort endif call remove(a:state, 'request') let sentinel = a:state.file . '.edit' - let file = FugitiveVimPath(readfile(sentinel, 1)[0]) + let file = FugitiveVimPath(readfile(sentinel, '', 1)[0]) exe substitute(a:state.mods, '\', '-tab', 'g') 'keepalt split' s:fnameescape(file) set bufhidden=wipe let s:edit_jobs[bufnr('')] = [a:state, a:tmp, a:job, sentinel] @@ -6373,7 +6373,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo let result = s:TempState(empty(expanded) ? @% : expanded) endif if !empty(result) && filereadable(get(result, 'file', '')) - for line in readfile(result.file, 4096) + for line in readfile(result.file, '', 4096) let rev = s:fnameescape(matchstr(line, '\]*[^[:space:]<>.,;:"''!?]')) if len(rev) break