mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Two copy modes are exclusive
This commit is contained in:
parent
f652a4fecb
commit
ebb4725204
18
nnn.c
18
nnn.c
|
@ -305,7 +305,7 @@ static const char messages[][16] =
|
|||
"HOME not set",
|
||||
"no traversal",
|
||||
"invalid key",
|
||||
"set NNN_COPIER",
|
||||
"set copy method",
|
||||
"%F %T %z",
|
||||
};
|
||||
|
||||
|
@ -2980,7 +2980,9 @@ nochange:
|
|||
copycurname();
|
||||
goto begin;
|
||||
case SEL_COPY:
|
||||
if (copier && ndents) {
|
||||
if (!(cfg.noxdisplay || copier))
|
||||
printmsg(messages[STR_COPY_ID]);
|
||||
else if (ndents) {
|
||||
if (cfg.copymode) {
|
||||
r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
|
||||
if (!appendfilepath(newpath, r))
|
||||
|
@ -3007,17 +3009,12 @@ nochange:
|
|||
spawn(copier, newpath, NULL, NULL, F_NOTRACE);
|
||||
printmsg(newpath);
|
||||
}
|
||||
} else if (!copier)
|
||||
printmsg(messages[STR_COPY_ID]);
|
||||
}
|
||||
goto nochange;
|
||||
case SEL_COPYMUL:
|
||||
if (!copier) {
|
||||
if (!(cfg.noxdisplay || copier))
|
||||
printmsg(messages[STR_COPY_ID]);
|
||||
goto nochange;
|
||||
} else if (!ndents) {
|
||||
goto nochange;
|
||||
}
|
||||
|
||||
else if (ndents) {
|
||||
cfg.copymode ^= 1;
|
||||
if (cfg.copymode) {
|
||||
g_crc = crc8fast((uchar *)dents, ndents * sizeof(struct entry));
|
||||
|
@ -3060,6 +3057,7 @@ nochange:
|
|||
} else
|
||||
printmsg("multi-copy off");
|
||||
}
|
||||
}
|
||||
goto nochange;
|
||||
case SEL_QUOTE:
|
||||
cfg.quote ^= 1;
|
||||
|
|
Loading…
Reference in a new issue