mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-22 20:11:27 +08:00
[Buffers] getbufinfo() may not be available
This commit is contained in:
@@ -623,7 +623,7 @@ endfunction
|
||||
|
||||
function! s:format_buffer(b)
|
||||
let name = bufname(a:b)
|
||||
let line = getbufinfo(a:b)[0]['lnum']
|
||||
let line = exists('*getbufinfo') ? getbufinfo(a:b)[0]['lnum'] : 0
|
||||
let name = empty(name) ? '[No Name]' : fnamemodify(name, ":p:~:.")
|
||||
let flag = a:b == bufnr('') ? s:blue('%', 'Conditional') :
|
||||
\ (a:b == bufnr('#') ? s:magenta('#', 'Special') : ' ')
|
||||
|
||||
Reference in New Issue
Block a user