From: Luuk van Baal Date: Fri, 22 Oct 2021 16:26:45 +0000 (+0200) Subject: Clear selection for send_to_explorer X-Git-Tag: v4.4~36^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fa9067afd4026f1617f5bdc9340054f5cead89d6;p=nnn.git Clear selection for send_to_explorer --- diff --git a/src/nnn.c b/src/nnn.c index 8c8e5e14..d7d32c6b 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5836,6 +5836,10 @@ static void send_to_explorer(int *presel) 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 @@ nochange: #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 */