Improve icon fetching by file extension (#423)

This commit is contained in:
Luís Simas
2021-06-01 15:40:00 -03:00
committed by GitHub
parent aa026ab87c
commit be784713d5
2 changed files with 5 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ local function file_new(cwd, name)
name = name,
absolute_path = absolute_path,
executable = is_exec,
extension = vim.fn.fnamemodify(name, ':e') or "",
extension = string.match(name, ".?[^.]+%.(.*)") or "",
match_name = path_to_matching_str(name),
match_path = path_to_matching_str(absolute_path),
}