瀏覽代碼

Handle DEL in rename prompt (Mac)

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

+ 1
- 0
src/nnn.c 查看文件

@@ -1269,6 +1269,7 @@ static char *xreadline(char *fname, char *prompt)
case '\n': // fallthrough
case '\r':
goto END;
case 127: /* Handle DEL */ // fallthrough
case '\b': /* some old curses (e.g. rhel25) still send '\b' for backspace */
if (pos > 0) {
memmove(buf + pos - 1, buf + pos, (len - pos) << 2);


+ 1
- 1
src/nnn.h 查看文件

@@ -109,7 +109,7 @@ static struct assoc assocs[] = {
static struct key bindings[] = {
/* Back */
{ KEY_BACKSPACE, SEL_BACK, "", "" },
{ 8 /* BS */, SEL_BACK, "", "" },
{ '\b' /* BS */, SEL_BACK, "", "" },
{ 127 /* DEL */, SEL_BACK, "", "" },
{ KEY_LEFT, SEL_BACK, "", "" },
{ 'h', SEL_BACK, "", "" },


Loading…
取消
儲存