nnn

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

commit 51f2fde0e6e1f2ce0a19a4c97d3dda78178779b9
parent 40f75e9c38268cd205dedf83413a36f7a1d9925f
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Tue, 14 Jun 2022 12:51:42 +0530

Revert #1398: Go to prev dir on bookmark key repeat

Reasons:

1. `b` is not a special key and will be interpreted as a filter
2. with this change pressing the standard `-` inside a symlinked
   bookmark takes back to the bookmarks directory. This deviates
   from the regular bookmarks behaviour.

Diffstat:
Mnnn.1 | 3---
Msrc/nnn.c | 9++-------
2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/nnn.1 b/nnn.1 @@ -363,9 +363,6 @@ There are 2 ways (can be used together) to manage bookmarks. On entering a bookmark, the directory where the select bookmark key was pressed is set as the previous directory. Press '-' to return to it. .Pp -When \fINNN_BMS\fR` is not set, it's possible to return to the previous directory -from the bookmarks directory using the select bookmark key. -.Pp .Sh UNITS The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y (powers of 1024), same as the default units in \fIls\fR. diff --git a/src/nnn.c b/src/nnn.c @@ -7144,13 +7144,8 @@ nochange: goto nochange; } - if (strcmp(path, newpath) == 0) { - if (bookmark || !*lastdir) - break; - - dir = lastdir; /* Go to last dir on bookmark key repeat */ - xstrsncpy(newpath, dir, PATH_MAX); - } + if (strcmp(path, newpath) == 0) + break; } /* In list mode, retain the last file name to highlight it, if possible */