Code Monkey home page Code Monkey logo

Comments (25)

jarun avatar jarun commented on May 17, 2024

Does the same item remain selected or the selection moves to a different item?

from nnn.

jarun avatar jarun commented on May 17, 2024

Also, please share the steps for reproduction. Otherwise it's difficult to figure out what's going wrong.

from nnn.

 avatar commented on May 17, 2024

The selector moves to a higher item, by a constant number, repeatedly with random intervals.
I used the nixpkgs expression to build, but pointed the 'src' to the latest commit (plus my own key config, but I tried a vanilla build, and had the same bug).
The behavior is constant.

from nnn.

jarun avatar jarun commented on May 17, 2024

What is the interval? Are you having any filter enabled (like size, time etc.)?

I didn't understand what you meant regarding building... did you try compiling and using nnn from master?

from nnn.

jarun avatar jarun commented on May 17, 2024

The behavior is constant.

I need the exact steps to observe this behaviour.

from nnn.

 avatar commented on May 17, 2024

Yes I compiled from master (I used the expression 'latest commit', but I means, latest commit on master). I used the nix expression I linked, but used the latest master as 'src'.
It seems to only jump up once every time a new folder is opened, after about one second. I said the number of entries jumped was constant. I was wrong; it usually jumps to the first item but not always.

from nnn.

jarun avatar jarun commented on May 17, 2024

When you enter a new directory, nnn should jump to the first entry instantly. Please note down what you did after entering the directory.

from nnn.

 avatar commented on May 17, 2024

I have narrowed it down better. Basically, every time it switches to a new folder (left or right), after a second it jumps to the highest visible item. If the intended behavior is to automatically selecte the highest visible item (I would want to change that personally), then there should not be 1000+ms before it happens. Could I just disable that 'goto top on open dir' completely?

edit: s/should/should\ not

from nnn.

jarun avatar jarun commented on May 17, 2024

Here's the defined behaviour:

  • If you are going into a directory (right) the first entry will be selected (otherwise, which one do we select?)
  • If you are going to the parent (left), the child directory will be selected in the parent

The selection is instant, there is no delay. If you are seeing a delay, there's something else in play.

Also, I asked earlier, do you have any filter set or are you in the navigate-as-you-type mode?

from nnn.

jarun avatar jarun commented on May 17, 2024

In addition to my earlier comment, I am not sure if it's relevant, but what's your hardware (CPU, RAM)?

from nnn.

 avatar commented on May 17, 2024

The expected behavior you are describing is what im seeing, so the jump is a separate issue. There is no filter, no navigate as I type mode, just plain browsing. This is happening on my workstation, so lots of cpu and ram.

from nnn.

jarun avatar jarun commented on May 17, 2024

Yes, we need to figure out what's taking it so long to jump.

Now when you say jump, are you saying that the selection shows up after a second, OR when you enter the dir something is selected first, then the selection jumps up to the topmost entry (as it should)?

Also what happens if you are in the light mode (press d)?

from nnn.

jarun avatar jarun commented on May 17, 2024

I'll setup nixOS on a VM and see if I can reproduce it. Makes life easier for both of us. ;)

from nnn.

 avatar commented on May 17, 2024

I mean everything behaves fine, the cursor appears where it should be, but if I then move the cursor down (or if it wasnt placed at the top), after a second the cursor will move back to the highest visible item. It will only do this only once every time a directory is opened.

from nnn.

 avatar commented on May 17, 2024

Light mode has the same bug.

from nnn.

jarun avatar jarun commented on May 17, 2024

I'll check.

from nnn.

jarun avatar jarun commented on May 17, 2024

Does nixos have libncursesw or ncursesw? I can see it links to ncurses.

from nnn.

 avatar commented on May 17, 2024

I rebuilt my system and the issue went away.
Sorry about that. Ill let you know if I ever find the cause.
Thanks a lot for nnn, I love it.

from nnn.

jarun avatar jarun commented on May 17, 2024

Awesome! Award a star. ;)

from nnn.

 avatar commented on May 17, 2024

The issue is caused by my custom key bindings.
I'll try reversing my changes line by line.

from nnn.

 avatar commented on May 17, 2024

Found it.
Changing 'Ctrl-U' for 'Ctrl-L' triggers the bug.
That makes sense, it's the shortcut for PageUp.
So it seems something is sending a 'Ctrl-L' signal to nnn after opening a directory.
Is it nnn doing that or would that be ncurses library?

from nnn.

jarun avatar jarun commented on May 17, 2024

Ctrl-L is for triggering a refresh. If you are tinkering with the defaults, I believe you have to go all the way and figure out the issue. I would have suggested something if I had any idea what goes wrong, but the number of keybinds are just too many right now to guess something.

from nnn.

 avatar commented on May 17, 2024

So nnn is sending the Ctrl-L signal?

from nnn.

jarun avatar jarun commented on May 17, 2024

No Page up. It's above Ctrl-L in the key bindings structure. So pressing Ctrl-L is doing what Ctrl-U should do.

from nnn.

jarun avatar jarun commented on May 17, 2024

It's difficult for me to pursue an issue which is not under my control. In your issue report you didn't even mention you are changing the code. If you are trying to hack things, you are welcome to do so. If you find it worth changing mainline, please raise a PR and I will review it if the change adds value to the current set of features. A bug report is not the right place to support experimental code changes.

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.