README.md | 5 +++--
nnn.1 | 11 +++++------
src/nnn.c | 13 +++++++++++++
diff --git a/README.md b/README.md
index 4ee622ae2a9259b805c136cf410aa43c83ddd3f1..2b067f103181010f8d56d965799df73838298b20 100644
--- a/README.md
+++ b/README.md
@@ -103,7 +103,8 @@ - Detailed stat-like file information
- Media information (needs mediainfo/exiftool)
- Convenience
- Create, rename files and directories
- - Select multiple files; copy, move, delete selection
+ - Select files across directories
+ - Copy, move, delete selection
- Batch rename/move/delete (needs vidir)
- Show directories in custom color (default: blue)
- Spawn a subshell in the current directory
@@ -374,7 +375,7 @@
To copy multiple absolute file paths:
- press ^Y (or Y) to enter selection mode. In this mode it's possible to
- - cherry-pick individual files one by one by pressing ^K on each entry; or,
+ - cherry-pick individual files one by one by pressing ^K on each entry (works across directories and contexts); or,
- navigate to another file in the same directory to select a range of files
- press ^Y (or Y) _again_ to copy the paths and exit the selection mode
diff --git a/nnn.1 b/nnn.1
index 27ce89dad278483ec89532ca07f29e0f936d40f3..a2528c7dc60c22da589cd56fa6e72167ff74398f 100644
--- a/nnn.1
+++ b/nnn.1
@@ -253,7 +253,7 @@ .Pp
To copy multiple file paths the selection mode should be enabled using \fI^Y\fR.
In this mode it's possible to
.Pp
-(1) cherry-pick individual files one by one by pressing ^K on each entry; or,
+(1) cherry-pick individual files one by one by pressing ^K on each entry (works across directories and contexts); or,
.br
(2) navigate to another file in the same directory to select a range of files.
.Pp
@@ -263,7 +263,10 @@ .Pp
To list the file paths copied to memory press \fIy\fR.
.Sh ENVIRONMENT
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
-when dealing with the !, e and p commands respectively.
+when dealing with the !, e and p commands respectively. A single combination to arguments is supported, e.g.:
+.Bd -literal
+ export EDITOR='vim -xR'
+.Ed
.Pp
\fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
\fI;\fR:
@@ -277,10 +280,6 @@ \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
files.
.Bd -literal
export NNN_USE_EDITOR=1
-
- NOTE: Arguments to the editor should be combined together, e.g.,
-
- export EDITOR='vim -xR'
.Ed
.Pp
\fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker.
diff --git a/src/nnn.c b/src/nnn.c
index dbc8556d127add9ebe5163a49d1b8a2bb9e01b21..90f8bbf48289873cbabc0049e51f36d4c1cf407a 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2397,11 +2397,14 @@ nlines = MIN(LINES - 4, ndents);
/* Clear screen */
erase();
+
+#ifdef DIR_LIMITED_COPY
if (cfg.copymode)
if (g_crc != crc8fast((uchar *)dents, ndents * sizeof(struct entry))) {
cfg.copymode = 0;
DPRINTF_S("selection off");
}
+#endif
/* Fail redraw if < than 11 columns, context info prints 10 chars */
if (COLS < 11) {
@@ -2823,7 +2826,9 @@ r = fd - '1'; /* Save the next context id */
if (cfg.curctx == r)
continue;
+#ifdef DIR_LIMITED_COPY
g_crc = 0;
+#endif
/* Save current context */
xstrlcpy(g_ctx[cfg.curctx].c_name, dents[cur].name, NAME_MAX + 1);
@@ -3072,6 +3077,14 @@ goto nochange;
}
if (!ncp) { /* Handle range selection */
+#ifndef DIR_LIMITED_COPY
+ if (g_crc != crc8fast((uchar *)dents, ndents * sizeof(struct entry))) {
+ cfg.copymode = 0;
+ printmsg("range error: dir/content changed");
+ DPRINTF_S("range error: dir/content changed");
+ goto nochange;
+ }
+#endif
if (cur < copystartid) {
copyendid = copystartid;
copystartid = cur;