Check if file is already selected before appending in picker mode

This commit is contained in:
Arun Prakash Jana 2021-07-24 01:51:20 +05:30
parent e2545f9596
commit d80fdf335b
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -6662,8 +6662,8 @@ nochange:
#endif #endif
/* If opened as vim plugin and Enter/^M pressed, pick */ /* If opened as vim plugin and Enter/^M pressed, pick */
if (g_state.picker && (sel == SEL_OPEN)) { if (g_state.picker && (sel == SEL_OPEN)) {
appendfpath(newpath, mkpath(path, pent->name, newpath)); if (!(pdents[cur].flags & FILE_SELECTED))
writesel(pselbuf, selbufpos - 1); appendfpath(newpath, mkpath(path, pent->name, newpath));
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }