aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nnn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 06c677e..7ce569e 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5453,6 +5453,8 @@ nochange:
if (ndents)
mkpath(path, dents[cur].name, newpath);
+ else if (sel == SEL_EDIT) /* Avoid trying to edit a non-existing file */
+ goto nochange;
switch (sel) {
case SEL_REDRAW: