mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 20:01:27 +00:00
Check if file is already selected before appending in picker mode
This commit is contained in:
parent
e2545f9596
commit
d80fdf335b
|
@ -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)) {
|
||||||
|
if (!(pdents[cur].flags & FILE_SELECTED))
|
||||||
appendfpath(newpath, mkpath(path, pent->name, newpath));
|
appendfpath(newpath, mkpath(path, pent->name, newpath));
|
||||||
writesel(pselbuf, selbufpos - 1);
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue