docsettings fix no name file (#8517)

When trying to open/delete a supported document with empty name (eg .txt) got an error

./luajit: frontend/docsettings.lua:118: attempt to concatenate a nil value
This commit is contained in:
hius07
2021-12-05 23:08:20 +02:00
committed by GitHub
parent e1f62e6098
commit 13d80739b6

View File

@@ -115,7 +115,7 @@ function DocSettings:open(docfile)
-- can handle two files with only different suffixes.
new.sidecar_file = self:getSidecarFile(docfile)
new.legacy_sidecar_file = sidecar.."/"..
docfile:match("([^%/]+%..+)")..".lua"
ffiutil.basename(docfile)..".lua"
end
local candidates = {}