From: Arun Prakash Jana Date: Mon, 12 Dec 2022 10:45:06 +0000 (+0530) Subject: Clear selection if all links are generated X-Git-Tag: v4.8~53 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=38d7090e646de3afbcfd8c1dc233f45425d37f0c;p=nnn.git Clear selection if all links are generated --- diff --git a/src/nnn.c b/src/nnn.c index c2f7af3b..9c61a8cf 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3724,7 +3724,6 @@ static int xlink(char *prefix, char *path, char *curfname, char *buf, int type) clearselection(); return 1; /* One link created */ } - return 0; } @@ -3743,7 +3742,8 @@ static int xlink(char *prefix, char *path, char *curfname, char *buf, int type) psel += len + 1; } - clearselection(); + if (count == nselected) /* Clear selection if all links are generated */ + clearselection(); return count; }