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
1 changed files with 2 additions and 2 deletions

View File

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