File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
lua/telescope/_extensions/file_browser Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -661,6 +661,12 @@ fb_actions.sort_by_size = function(prompt_bufnr)
661
661
local finder = action_state .get_current_picker (prompt_bufnr ).finder
662
662
finder .__sort_size = not finder .__sort_size
663
663
sort_by (prompt_bufnr , function (x , y )
664
+ if not x .stat then
665
+ return false
666
+ end
667
+ if not y .stat then
668
+ return true
669
+ end
664
670
if x .stat .size > y .stat .size then
665
671
return finder .__sort_size
666
672
elseif x .stat .size < y .stat .size then
@@ -678,6 +684,12 @@ fb_actions.sort_by_date = function(prompt_bufnr)
678
684
local finder = action_state .get_current_picker (prompt_bufnr ).finder
679
685
finder .__sort_date = not finder .__sort_date
680
686
sort_by (prompt_bufnr , function (x , y )
687
+ if not x .stat then
688
+ return false
689
+ end
690
+ if not y .stat then
691
+ return true
692
+ end
681
693
if x .stat .mtime .sec > y .stat .mtime .sec then
682
694
return finder .__sort_date
683
695
elseif x .stat .mtime .sec < y .stat .mtime .sec then
You can’t perform that action at this time.
0 commit comments