Revert "Enter type-to-nav for bookmarks dir"

This reverts commit 8cdeddeb4a.
This commit is contained in:
Arun Prakash Jana 2022-05-30 22:20:45 +05:30
parent 85be28c019
commit 10e2d37d0f
1 changed files with 4 additions and 9 deletions

View File

@ -367,12 +367,12 @@ typedef struct {
uint_t rangesel : 1; /* Range selection on */
uint_t runctx : 3; /* The context in which plugin is to be run */
uint_t runplugin : 1; /* Choose plugin mode */
uint_t selbm : 2; /* Select bookmark dir and store type-to-nav */
uint_t selbm : 1; /* Select a bookmark from bookmarks directory */
uint_t selmode : 1; /* Set when selecting files */
uint_t stayonsel : 1; /* Disable auto-jump on select */
uint_t trash : 2; /* Trash method 0: rm -rf, 1: trash-cli, 2: gio trash */
uint_t uidgid : 1; /* Show owner and group info */
uint_t reserved : 5; /* Adjust when adding/removing a field */
uint_t reserved : 6; /* Adjust when adding/removing a field */
} runstate;
/* Contexts or workspaces */
@ -4988,17 +4988,14 @@ static size_t handle_bookmark(const char *bmark, char *newpath)
bmark ? xstrsncpy(newpath, bmark, PATH_MAX) : (r = MSG_NOT_SET);
else if (fd == '\r') { /* Visit bookmarks directory */
mkpath(cfgpath, toks[TOK_BM], newpath);
g_state.selbm = cfg.filtermode + 1;
cfg.filtermode = 1;
g_state.selbm = 1;
} else if (!get_kv_val(bookmark, newpath, fd, maxbm, NNN_BMS))
r = MSG_INVALID_KEY;
if (!r && chdir(newpath) == -1) {
r = MSG_ACCESS;
if (g_state.selbm) {
cfg.filtermode = g_state.selbm - 1;
if (g_state.selbm)
g_state.selbm = 0;
}
}
return r;
@ -6907,7 +6904,6 @@ nochange:
/* Cannot descend in empty directories */
if (!ndents) {
cd = FALSE;
cfg.filtermode = g_state.selbm - 1;
g_state.selbm = g_state.runplugin = 0;
goto begin;
}
@ -6917,7 +6913,6 @@ nochange:
S_ISLNK(pent->mode)
? (realpath(pent->name, newpath) && xstrsncpy(path, lastdir, PATH_MAX))
: mkpath(path, pent->name, newpath);
cfg.filtermode = g_state.selbm - 1;
g_state.selbm = 0;
} else
mkpath(path, pent->name, newpath);