Get the filename for buffers in a way that NeoVim will like.

This commit is contained in:
w0rp 2016-10-04 14:50:07 +01:00
parent 705f4232c0
commit 8c1f0178ed

View file

@ -157,7 +157,7 @@ function! s:ApplyLinter(buffer, linter)
if command =~# '%s'
" If there is a '%s' in the command string, replace it with the name
" of the file.
let command = printf(command, shellescape(getbufinfo(a:buffer)[0].name))
let command = printf(command, shellescape(fnamemodify(bufname(a:buffer), ':p')))
endif
if has('nvim')