perf: replace vim.endswith and vim.startswith with string.match
This commit is contained in:
parent
01b0b9d8ef
commit
4de30256c3
4 changed files with 8 additions and 4 deletions
|
|
@ -347,7 +347,8 @@ M.addslash = function(path, os_slash)
|
|||
slash = "\\"
|
||||
end
|
||||
|
||||
if not vim.endswith(path, slash) then
|
||||
local endslash = path:match(slash .. "$")
|
||||
if not endslash then
|
||||
return path .. slash
|
||||
else
|
||||
return path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue