nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d80fdf335b665b1fe01eb0e1e4028f93ceb026aa
parent e2545f95966938dc1ef04f9aaa6bb565695b42ab
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat, 24 Jul 2021 01:51:20 +0530

Check if file is already selected before appending in picker mode

Diffstat:
Msrc/nnn.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -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; }