소스 검색

Fix https://github.com/mcchrish/nnn.vim/issues/39

If nnn is started in the picker mode, do NOT use libreadline.
Fallback to the stock mechanism to show the command prompt.
master
Arun Prakash Jana 5 년 전
부모
커밋
929edaf243
No known key found for this signature in database GPG 키 ID: A75979F35C080412
1개의 변경된 파일22개의 추가작업 그리고 14개의 파일을 삭제
  1. +22
    -14
      src/nnn.c

+ 22
- 14
src/nnn.c 파일 보기

@@ -3888,27 +3888,35 @@ nochange:
}
break;
default: /* SEL_RUNCMD */
exitcurses();
if (cfg.picker)
tmp = xreadline(NULL, "> ");
else {
/* Use libreadline */
exitcurses();

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

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

tmp = readline("nnn> ");
if (chdir(ipath) == -1) {
printwarn();
goto nochange;
}

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

refresh();

if (tmp && tmp[0]) {
spawn(shell, "-c", tmp, path, F_NORMAL | F_SIGINT);
add_history(tmp);
free(tmp);
if (!cfg.picker) {
/* readline finishing touches */
add_history(tmp);
free(tmp);
}
}
}



불러오는 중...
취소
저장