[filename] avoid new file status for unnamed (#795)
This commit is contained in:
parent
03bcf015d1
commit
7b4b864af7
|
@ -29,7 +29,8 @@ end
|
|||
|
||||
local function is_new_file()
|
||||
local filename = vim.fn.expand('%')
|
||||
return vim.bo.buftype == '' and vim.fn.filereadable(filename) == 0
|
||||
return filename ~= '' and vim.bo.buftype == '' and
|
||||
vim.fn.filereadable(filename) == 0
|
||||
end
|
||||
|
||||
---shortens path by turning apple/orange -> a/orange
|
||||
|
|
Loading…
Reference in New Issue