atom / tree-view

🌳 Explore and open project files in Atom
MIT License
561 stars 364 forks source link

Improve files sorting #1343

Open AlexWayfer opened 4 years ago

AlexWayfer commented 4 years ago

Prerequisites

Description

Please, improve the sorting of files. Shorten file names should be before longer ones.

Steps to Reproduce

  1. Create (have) two files in an opened project, like find.rb and find_or_create.rb

Expected behavior:

find.rb is above of find_or_create.rb.

https://repl.it/@AlexWayfer/UnfortunateComfortableOop

Actual behavior:

find_or_create.rb is above of find.rb.

image

Reproduces how often:

100%

Versions

Atom    : 1.48.0
Electron: 5.0.13
Chrome  : 73.0.3683.121
Node    : 12.0.0
Eschon commented 4 years ago

I've noticed that too. I guess the problem is that the whole file name, including the extension is used for sorting. And _ is sorted before .

Not sure if this would be considered a bug or if that just is expected behaviour. It's not a huge deal in my opinion but it would be nice if it could be "fixed"