diff --git a/src/nnn.c b/src/nnn.c index 06c677e0..7ce569e6 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: