Git Product home page Git Product logo

Comments (2)

jarun avatar jarun commented on May 31, 2024 1

I tried the following:

Sort manually by size (s) and switch to an ordered context. In this case the sort order is not changed in the second context.
However, if I manually set the reverse order (r) or version sort (v), the reverse order is added in the second context too.

The second observations seems to be a manifestation of the same. If you check set_sort_flags(), r and v use special function pointers. It seems they are retained and adds up along with the order dictated by NNN_ORDER even for a context that is already open.

The issue maybe somewhere in the below lines:

6838         if (order && cd) {
6839                 if (cfgsort[cfg.curctx] != '0') {
6840                         if (cfgsort[cfg.curctx] == 'z')
6841                                 set_sort_flags('c');
6842                         if ((!cfgsort[cfg.curctx] || (cfgsort[cfg.curctx] == 'c'))
6843                             && ((r = get_kv_key(order, path, maxorder, NNN_ORDER)) > 0)) { // NOLINT
6844                                 set_sort_flags(r);                                                                 
6845                                 cfgsort[cfg.curctx] = 'z';
6846                         }
6847                 } else
6848                         cfgsort[cfg.curctx] = cfgsort[CTX_MAX];
6849         }

Please have a look and raise a PR.

from nnn.

azuline avatar azuline commented on May 31, 2024

thanks, took a look and put up a pull request!

from nnn.

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.