jarun / nnn

n³ The unorthodox terminal file manager
BSD 2-Clause "Simplified" License
19.38k stars 761 forks source link

Toggle type-to-nav (^N) like global switch #1938

Closed amalgame21 closed 2 months ago

amalgame21 commented 2 months ago

This commit bring the current type-to-nav mode state to next context while changing to the next context, making toggling the type-to-nav (^N) like a global switch, instead of the original behavior which store each type-to-nav mode state per context.

I think it is much easier to control the workflow because I no longer need to remember which context is in type-to-nav mode or not.

Feel free to reject it if it does not match nnn's design.

jarun commented 2 months ago

It's not about design, a use case would be broken.

When we create the context, the type-to-nav feature is also enabled. So if it's disabled for a context, it's because the user has decided to disable it explicitly. We can't override that every time there is a context switch because in that case there would be now simple way to switch contexts without disabling type-to-nav.