mirror of
https://github.com/jarun/nnn.git
synced 2025-01-23 09:16:46 +00:00
Rename COPY macros to SEL
This commit is contained in:
parent
8ea41dd0e5
commit
d23c2997af
12
src/nnn.c
12
src/nnn.c
|
@ -3954,7 +3954,7 @@ nochange:
|
||||||
/* Repopulate as directory content may have changed */
|
/* Repopulate as directory content may have changed */
|
||||||
goto begin;
|
goto begin;
|
||||||
}
|
}
|
||||||
case SEL_COPY:
|
case SEL_SEL:
|
||||||
if (!ndents)
|
if (!ndents)
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
||||||
|
@ -4002,7 +4002,7 @@ nochange:
|
||||||
dents[cur].flags |= FILE_COPIED;
|
dents[cur].flags |= FILE_COPIED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SEL_COPYMUL:
|
case SEL_SELMUL:
|
||||||
cfg.copymode ^= 1;
|
cfg.copymode ^= 1;
|
||||||
if (cfg.copymode) {
|
if (cfg.copymode) {
|
||||||
if (copybufpos) {
|
if (copybufpos) {
|
||||||
|
@ -4033,8 +4033,8 @@ nochange:
|
||||||
} else
|
} else
|
||||||
copyendid = cur;
|
copyendid = cur;
|
||||||
} // fallthrough
|
} // fallthrough
|
||||||
case SEL_COPYALL:
|
case SEL_SELALL:
|
||||||
if (sel == SEL_COPYALL) {
|
if (sel == SEL_SELALL) {
|
||||||
if (!ndents)
|
if (!ndents)
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
||||||
|
@ -4045,7 +4045,7 @@ nochange:
|
||||||
copyendid = ndents - 1;
|
copyendid = ndents - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!ncp && copystartid < copyendid) || sel == SEL_COPYALL) {
|
if ((!ncp && copystartid < copyendid) || sel == SEL_SELALL) {
|
||||||
for (r = copystartid; r <= copyendid; ++r) {
|
for (r = copystartid; r <= copyendid; ++r) {
|
||||||
appendfpath(newpath, mkpath(path, dents[r].name, newpath));
|
appendfpath(newpath, mkpath(path, dents[r].name, newpath));
|
||||||
dents[r].flags |= FILE_COPIED;
|
dents[r].flags |= FILE_COPIED;
|
||||||
|
@ -4069,7 +4069,7 @@ nochange:
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
case SEL_COPYLIST:
|
case SEL_SELLST:
|
||||||
if (showcplist() || showcpfile()) {
|
if (showcplist() || showcpfile()) {
|
||||||
if (cfg.filtermode)
|
if (cfg.filtermode)
|
||||||
presel = FILTER;
|
presel = FILTER;
|
||||||
|
|
20
src/nnn.h
20
src/nnn.h
|
@ -76,10 +76,10 @@ enum action {
|
||||||
SEL_MTIME,
|
SEL_MTIME,
|
||||||
SEL_WILD,
|
SEL_WILD,
|
||||||
SEL_REDRAW,
|
SEL_REDRAW,
|
||||||
SEL_COPY,
|
SEL_SEL,
|
||||||
SEL_COPYMUL,
|
SEL_SELMUL,
|
||||||
SEL_COPYALL,
|
SEL_SELALL,
|
||||||
SEL_COPYLIST,
|
SEL_SELLST,
|
||||||
SEL_CP,
|
SEL_CP,
|
||||||
SEL_MV,
|
SEL_MV,
|
||||||
SEL_RMMUL,
|
SEL_RMMUL,
|
||||||
|
@ -203,15 +203,15 @@ static struct key bindings[] = {
|
||||||
/* Redraw window */
|
/* Redraw window */
|
||||||
{ CONTROL('L'), SEL_REDRAW },
|
{ CONTROL('L'), SEL_REDRAW },
|
||||||
/* Copy currently selected file path */
|
/* Copy currently selected file path */
|
||||||
{ CONTROL('K'), SEL_COPY },
|
{ CONTROL('K'), SEL_SEL },
|
||||||
{ ' ', SEL_COPY },
|
{ ' ', SEL_SEL },
|
||||||
/* Toggle copy multiple file paths */
|
/* Toggle copy multiple file paths */
|
||||||
{ 'K', SEL_COPYMUL },
|
{ 'K', SEL_SELMUL },
|
||||||
{ CONTROL('Y'), SEL_COPYMUL },
|
{ CONTROL('Y'), SEL_SELMUL },
|
||||||
/* Select all files in current dir */
|
/* Select all files in current dir */
|
||||||
{ 'Y', SEL_COPYALL },
|
{ 'Y', SEL_SELALL },
|
||||||
/* Show list of copied files */
|
/* Show list of copied files */
|
||||||
{ 'y', SEL_COPYLIST },
|
{ 'y', SEL_SELLST },
|
||||||
/* Copy from copy buffer */
|
/* Copy from copy buffer */
|
||||||
{ 'P', SEL_CP },
|
{ 'P', SEL_CP },
|
||||||
/* Move from copy buffer */
|
/* Move from copy buffer */
|
||||||
|
|
Loading…
Reference in a new issue