浏览代码

Incorporate PR #368

master
Arun Prakash Jana 5 年前
父节点
当前提交
53a2e4c560
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 1 个文件被更改,包括 12 次插入10 次删除
  1. +12
    -10
      src/nnn.c

+ 12
- 10
src/nnn.c 查看文件

@@ -3424,7 +3424,7 @@ static bool run_selected_plugin(char **path, const char *file, char *newpath, ch
if (len > 1) { if (len > 1) {
int ctx = g_buf[0] - '0'; int ctx = g_buf[0] - '0';


if (ctx == 0) { if (ctx == 0 || ctx == cfg.curctx + 1) {
xstrlcpy(*lastdir, *path, PATH_MAX); xstrlcpy(*lastdir, *path, PATH_MAX);
xstrlcpy(*path, g_buf + 1, PATH_MAX); xstrlcpy(*path, g_buf + 1, PATH_MAX);
} else if (ctx >= 1 && ctx <= CTX_MAX) { } else if (ctx >= 1 && ctx <= CTX_MAX) {
@@ -4966,18 +4966,20 @@ nochange:
if (tmp[0] == '_' && tmp[1]) { if (tmp[0] == '_' && tmp[1]) {
xstrlcpy(newpath, ++tmp, PATH_MAX); xstrlcpy(newpath, ++tmp, PATH_MAX);
flag = F_CLI | F_CONFIRM; flag = F_CLI | F_CONFIRM;
tmp = NULL; spawn(newpath, (ndents ? dents[cur].name : NULL),
NULL, path, flag);
} else { } else {
mkpath(plugindir, tmp, newpath); xstrlcpy(rundir, path, PATH_MAX);
tmp = path; xstrlcpy(path, plugindir, PATH_MAX);
} if (!run_selected_plugin(&path, tmp, newpath, rundir,
(ndents ? dents[cur].name : NULL),
&lastname, &lastdir))
goto nochange;


spawn(newpath, (ndents ? dents[cur].name : NULL), }
tmp, path, flag);


if (cfg.filtermode) setdirwatch();
presel = FILTER; goto begin;
goto nochange;
} }


cfg.runplugin ^= 1; cfg.runplugin ^= 1;


||||||
x
 
000:0
正在加载...
取消
保存