From: Arun Prakash Jana Date: Fri, 30 Nov 2018 15:22:07 +0000 (+0530) Subject: Fix #155: do not discard seleciton on Enter X-Git-Tag: v2.2~92 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=33b22b8560251d4aa19d81f686d40fab603ea1f7;p=nnn.git Fix #155: do not discard seleciton on Enter --- diff --git a/src/nnn.c b/src/nnn.c index 89f2f0fd..a49bd34d 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;