From: Arun Prakash Jana Date: Fri, 16 Jul 2021 05:39:20 +0000 (+0530) Subject: Fix selection in / X-Git-Tag: v4.2~17 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=26f44f0dfcf5e4e9c92aef65d323c4b39418a61c;p=nnn.git Fix selection in / --- diff --git a/src/nnn.c b/src/nnn.c index 598d78db..d0334f5a 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1752,8 +1752,9 @@ static void rmfromselbuf(size_t len) static int scanselforpath(const char *path, bool getsize) { if (!path[1]) { /* path should always be at least two bytes (including NULL) */ + g_buf[0] = '/'; findselpos = pselbuf; - return TRUE; + return 1; /* Length of '/' is 1 */ } size_t off = xstrsncpy(g_buf, path, PATH_MAX);