the size of g_buf depends on PATH_MAX and NAME_MAX which on certain
platforms (such as mac) might not be big enough to decode the help
string. use an explicit buffer with proper size instead.
Closes: https://github.com/jarun/nnn/issues/1768
This is useful for situations where the executable is compiled with
readline support but the user wants to use the native prompt. Often
this happens because packagers build without readline disabled.
Forward jumping to the next young file is implemented. The starting
position from which the next young file is searched is the next
position. If no young file has been found, the search starts from the
beginning. It stops at the initial position where the search has
started.
according to the manpage, it won't have any effect on 64bit system
anyways. and musl always uses 64bit so this macro doesn't have any
effect there either.
this avoids multiple printf calls and instead decodes the buffer
natively. using %NN instead of %-NNc also saves two bytes per run.
helpstr is also made `static` to avoid unnecessary stack allocation.
this makes it so that if the cp/mv commands are changed the in the
future, it will continue to work reliably instead of having hardcoded
indexes to modify the array.
the `#ifdef __linux__` is also removed, compilers should be smart enough
to see that PROGRESS_{CP,MV} are unused (on non-linux systems) and
optimize it out.
- Clear filter only when a plugin is selected manually.
Plugin dir should be unfiltered when opened.
- Plugins invoked by keys don't require clearing filter
of original context. If a new context is opened using
the plugin, it will be unfiltered by default. If the
same context is re-used (when all the contexts are in
use) the filter should be cleared so the the new path
is opened unfiltered.
the rename plugin always asks for "selection vs current" even when -u
flag is active. pass it to the plugin via `NNN_PREFER_SELECTION` so that
there's less distracting prompts.