Skip to content

Commit

Permalink
fix: trash mtime should be sortable
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Oct 17, 2023
1 parent 4374037 commit 098eb7f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/oil/adapters/trash/freedesktop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,17 @@ file_columns.mtime = {
return ret
end,

get_sort_value = function(entry)
local meta = entry[FIELD_META]
---@type nil|oil.TrashInfo
local trash_info = meta.trash_info
if trash_info then
return trash_info.deletion_date
else
return 0
end
end,

parse = function(line, conf)
local fmt = conf and conf.format
local pattern
Expand Down

0 comments on commit 098eb7f

Please sign in to comment.