src/nnn.c | 6 +++++- diff --git a/src/nnn.c b/src/nnn.c index 8c8e5e1491d8c90bcdb1b2e8bfb58de01378ebb1..d7d32c6bfa9abaebae5ea76753e97b56e8894122 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5836,6 +5836,10 @@ if (nselected) { int fd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0600); if ((fd == -1) || (seltofile(fd, NULL) != (size_t)(selbufpos))) printwarn(presel); + else { + resetselind(); + clearselection(); + } if (fd > 1) close(fd); } else @@ -6836,7 +6840,7 @@ } #ifndef NOFIFO if (g_state.fifomode && (sel == SEL_OPEN)) { send_to_explorer(&presel); /* Write selection to explorer fifo */ - goto nochange; + break; } #endif /* If opened as vim plugin and Enter/^M pressed, pick */