瀏覽代碼

Fix readline() call sequence

master
Arun Prakash Jana 6 年之前
父節點
當前提交
afafb7ef8f
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 6 次插入8 次删除
  1. +6
    -8
      src/nnn.c

+ 6
- 8
src/nnn.c 查看文件

@@ -3822,33 +3822,31 @@ nochange:
spawn(shell, "-c", tmp, path, F_CLI);
#ifndef NORL
} else {
exitcurses();

/* Switch to current path for readline(3) */
if (chdir(path) == -1) {
printwarn();
goto nochange;
}

exitcurses();

tmp = readline("nnn> ");

refresh();

if (chdir(ipath) == -1) {
printwarn();
if (tmp)
free(tmp);
free(tmp);
goto nochange;
}

refresh();

if (tmp && tmp[0]) {
spawn(shell, "-c", tmp, path, F_CLI);
/* readline finishing touches */
add_history(tmp);
}

if (tmp)
free(tmp);
free(tmp);
}
#endif
}


Loading…
取消
儲存