nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5c7aaa6d0d10bdc1c1135b9a9cfd0d7e181303ef
parent b5e0023bfc0b4eed536eeda6c193755b8a414792
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Thu, 30 Mar 2017 02:12:44 +0530

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.

Diffstat:
Mnoice.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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; }