From: Arun Prakash Jana Date: Wed, 29 Mar 2017 20:42:44 +0000 (+0530) Subject: Shows 'Cannot resolve path' on narrow terminal X-Git-Tag: v1.0~62 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5c7aaa6d0d10bdc1c1135b9a9cfd0d7e181303ef;p=nnn.git Shows 'Cannot resolve path' on narrow terminal noice truncates the cwd string dynamically. If the numbers of columns is lesser than the length of the path, cwd is truncated so that the correct path cannot be resolved. We should try to resolve the full path instead. --- diff --git a/noice.c b/noice.c index 83319ade..96bc5a1e 100644 --- a/noice.c +++ b/noice.c @@ -614,7 +614,7 @@ redraw(char *path) ncols = PATH_MAX; strlcpy(cwd, path, ncols); cwd[ncols - strlen(CWD) - 1] = '\0'; - if (!realpath(cwd, cwdresolved)) { + if (!realpath(path, cwdresolved)) { printmsg("Cannot resolve path"); return; }