Skip to content

Commit

Permalink
fix: do not use the logic without 'filename_first'
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus committed May 1, 2024
1 parent eb522e9 commit 81abed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/frecency/entry_maker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function EntryMaker:items(entry, workspace, workspace_tag, formatter)
end
local formatted_name, path_style = formatter(entry.name)
-- NOTE: this means it is formatted with the option: filename_first
if path_style and type(path_style) == "table" then
if path_style and type(path_style) == "table" and #path_style > 0 then
local index = path_style[1][1]
local filename = formatted_name:sub(1, index[1])
local parent_path = formatted_name:sub(index[1] + 2, index[2])
Expand Down

0 comments on commit 81abed0

Please sign in to comment.