nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 9576eb62e6e59eff11f069d10ca3d28b24f77611
parent f9fe9a7d57cc289a26150e3e49943e50137cefdf
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sat, 21 May 2016 21:23:49 +0200

browser: show a message when getcwd() fails, instead of just beeping

Diffstat:
Msrc/browser.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/browser.c b/src/browser.c @@ -385,7 +385,12 @@ char *do_browse_from(const char *inpath) path = charalloc(PATH_MAX + 1); path = getcwd(path, PATH_MAX + 1); - if (path != NULL) + if (path == NULL) { + statusline(MILD, "The working directory has disappeared"); + beep(); + napms(1200); + return NULL; + } else align(&path); } }