File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 62
62
utils .get_entries = function (opts )
63
63
--- @type { file : OrgApiFile , filename : string , last_used : number } []
64
64
local file_results = vim .tbl_map (function (file )
65
- return { file = file , filename = file .filename }
65
+ local file_stat = vim .loop .fs_stat (file .filename ) or 0
66
+ return { file = file , filename = file .filename , last_used = file_stat .mtime .sec }
66
67
end , orgmode .load ())
67
68
68
69
if not opts .archived then
@@ -71,6 +72,11 @@ utils.get_entries = function(opts)
71
72
end , file_results )
72
73
end
73
74
75
+ -- sorting does not work with the fuzzy sorters
76
+ table.sort (file_results , function (a , b )
77
+ return a .last_used > b .last_used
78
+ end )
79
+
74
80
if opts .state and opts .state .current and opts .state .current .max_depth == 0 then
75
81
return index_orgfiles (file_results , opts )
76
82
end
@@ -94,7 +100,6 @@ utils.make_entry = function(opts)
94
100
items = {
95
101
{ width = vim .F .if_nil (opts .location_width , 20 ) },
96
102
{ remaining = true },
97
- -- { width = vim.F.if_nil(opts.tag_width, 20) },
98
103
},
99
104
})
100
105
You can’t perform that action at this time.
0 commit comments