Merge pull request #1207 from luukvbaal/master

Clear selection for send_to_explorer
This commit is contained in:
Terminator X 2021-10-22 22:04:49 +05:30 committed by GitHub
commit 0c0afd4799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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