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
reviewable/pr8519/r1
hius07 2 years ago committed by GitHub
parent e1f62e6098
commit 13d80739b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 = {}

Loading…
Cancel
Save