diff -ur original-src/browser.c my-src/browser.c --- original-src/browser.c 2016-02-26 02:17:10.000000000 +0530 +++ my-src/browser.c 2016-04-24 20:59:22.692178712 +0530 @@ -42,8 +42,6 @@ /* The number of columns in the longest filename in the list. */ static size_t selected = 0; /* The currently selected filename in the list; zero-based. */ -static char *path_save = NULL; - /* A copy of the current path. */ /* Our main file browser function. path is the tilde-expanded path we * start browsing from. */ Only in my-src/: .deps diff -ur original-src/files.c my-src/files.c --- original-src/files.c 2016-02-26 02:17:10.000000000 +0530 +++ my-src/files.c 2016-04-24 20:59:22.720178712 +0530 @@ -2713,7 +2713,11 @@ free(tmpdirname); } else { filename = dirname; - dirname = mallocstrcpy(NULL, "./"); + dirname = mallocstrcpy(NULL, path_save); + if (dirname[strlen(dirname) - 1] != '/') { + dirname = realloc(dirname, PATH_MAX + 1); + strcat(dirname, "/"); + } } assert(dirname[strlen(dirname) - 1] == '/'); diff -ur original-src/global.c my-src/global.c --- original-src/global.c 2016-02-22 20:17:49.000000000 +0530 +++ my-src/global.c 2016-04-24 20:59:22.720178712 +0530 @@ -40,6 +40,8 @@ /* Whether the current keystroke is an extended keypad value. */ bool focusing = FALSE; /* Whether an update of the edit window should center the cursor. */ +char *path_save = NULL; + /* Stores current path in browser for cwd_tab_completion(). */ #ifndef NANO_TINY int controlleft = CONTROL_LEFT; diff -ur original-src/proto.h my-src/proto.h --- original-src/proto.h 2016-02-26 02:17:10.000000000 +0530 +++ my-src/proto.h 2016-04-24 20:59:22.744178712 +0530 @@ -34,6 +34,7 @@ extern bool meta_key; extern bool func_key; extern bool focusing; +extern char *path_save; #ifndef NANO_TINY extern int controlleft;