aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-03-30 02:12:44 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-03-30 02:12:44 +0530
commit5c7aaa6d0d10bdc1c1135b9a9cfd0d7e181303ef (patch)
tree2141235ec01163fe7d86d2a6e9526963f91934a9
parentb5e0023bfc0b4eed536eeda6c193755b8a414792 (diff)
downloadnnn-5c7aaa6d0d10bdc1c1135b9a9cfd0d7e181303ef.tar.gz
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.
-rw-r--r--noice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/noice.c b/noice.c
index 83319ad..96bc5a1 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;
}