diff --git a/src/browser.c b/src/browser.c index 4d784bd..f799e8b 100644 --- a/src/browser.c +++ b/src/browser.c @@ -262,6 +262,12 @@ char *do_browser(char *path) continue; } #endif + /* Only if given path is exactly ".." then, after moving to + * parent direcory, highlight previous working directory. */ + if (strcmp(answer, "..") == 0) + present_name = free_and_assign(present_name, + striponedir(path)); + /* Snip any trailing slashes, so the name can be compared. */ while (strlen(path) > 1 && path[strlen(path) - 1] == '/') path[strlen(path) - 1] = '\0';