aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nnn.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 89f2f0f..a49bd34 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2653,10 +2653,8 @@ nochange:
/* If opened as vim plugin and Enter/^M pressed, pick */
if (cfg.picker && sel == SEL_GOIN) {
r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
- /* NOTE: This overrides any previous selection */
- copybufpos = 0;
appendfpath(newpath, r);
- writecp(newpath, r - 1);
+ writecp(pcopybuf, copybufpos - 1);
dentfree(dents);
return;