瀏覽代碼

Fix #639: store NNNLVL in tmp var

master
Arun Prakash Jana 5 年之前
父節點
當前提交
fdfbac0386
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      src/nnn.c

+ 3
- 2
src/nnn.c 查看文件

@@ -6377,11 +6377,12 @@ nochange:
case SEL_SHELL: case SEL_SHELL:
/* Set nnn nesting level */ /* Set nnn nesting level */
tmp = getenv(env_cfg[NNNLVL]); tmp = getenv(env_cfg[NNNLVL]);
setenv(env_cfg[NNNLVL], xitoa((tmp ? atoi(tmp) : 0) + 1), 1);
r = tmp ? atoi(tmp) : 0;
setenv(env_cfg[NNNLVL], xitoa(r + 1), 1);


setenv(envs[ENV_NCUR], (ndents ? dents[cur].name : ""), 1); setenv(envs[ENV_NCUR], (ndents ? dents[cur].name : ""), 1);
spawn(shell, NULL, NULL, F_CLI); spawn(shell, NULL, NULL, F_CLI);
setenv(env_cfg[NNNLVL], xitoa(tmp ? atoi(tmp) : 0), 1);
setenv(env_cfg[NNNLVL], xitoa(r), 1);
r = TRUE; r = TRUE;
break; break;
case SEL_LAUNCH: case SEL_LAUNCH:


Loading…
取消
儲存