From cf0ea993df963e05a2a54dda7cc1d9b32266f632 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 13 Feb 2019 23:41:49 +0530 Subject: [PATCH] Add comments --- src/nnn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index f59c0718..b2e28452 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1884,9 +1884,11 @@ static char *unescape(const char *str, uint maxcols) if (maxcols) { len = lencount = wcswidth(wbuf, len); + /* Reduce nuber of wide chars to max columns */ if (len > maxcols) lencount = maxcols + 1; + /* Reduce wide chars one by one till it fits */ while (len > maxcols) len = wcswidth(wbuf, --lencount);