aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index dbc8556..90f8bbf 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2397,11 +2397,14 @@ static void redraw(char *path)
/* 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 @@ nochange:
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 @@ 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;