GithubHelp home page GithubHelp logo

Comments (5)

patleeman avatar patleeman commented on August 18, 2024

@ukyo The list recent notes functionality actually sorts the notes by last accessed time (mtime), not last created or by the timestamp in the note name. The idea behind this function is to quickly access the notes you've modified last. So by your screenshot, it looks to be working properly, if haven't gone back and edited any of the other notes.

Here's the code that sorts the last several notes in the folder. This functionality is also capped to a certain number of results. By default, it's set at 15, but you can change by setting vsnotes.listRecentLimit = X where X is your desired list length.

Does this clear up any confusion about what this feature does? Or did I not understand the issue?

from vsnotes.

ukyoi avatar ukyoi commented on August 18, 2024

@patleeman Thanks for you reply. Now I know where the problem is.

The sort function with the comparison function sorts the array ascending, but it need to reverse the list before (rather than after) running the following for loop, or the newest items will be dropped with the break of the loop if the length of the array exceed the limit of listRecentLimit.

OS: macOS 10.13.5
Hardware: MacBook Pro (Retina 13-inch, 2015)
VSCode version: 1.25.0 Insider

from vsnotes.

patleeman avatar patleeman commented on August 18, 2024

Thanks for debugging that @ukyoi!

Unfortunately, I'm pretty busy these days and don't have much time to implement this fix. If you can submit a PR to fix this, that would be extremely helpful.

from vsnotes.

patleeman avatar patleeman commented on August 18, 2024

Fixed in d1aa0cd

from vsnotes.

ukyoi avatar ukyoi commented on August 18, 2024

@patleeman Now it works like a charm. Thanks for your work.

from vsnotes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.