瀏覽代碼

Exit prompt on ^D at empty prompt

master
Arun Prakash Jana 5 年之前
父節點
當前提交
e3d80da2ad
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. +6
    -2
      src/nnn.c

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

@@ -2412,8 +2412,12 @@ static char *xreadline(const char *prefill, const char *prompt)
case CONTROL('D'):
if (pos < len)
++pos;
else
continue; // fallthrough
else if (!(pos || len)) { /* Exit on ^D at empty prompt */
len = 0;
goto END;
} else
continue;
// fallthrough
case 127: // fallthrough
case '\b': /* rhel25 sends '\b' for backspace */
if (pos > 0) {


Loading…
取消
儲存