소스 검색

Add emacs-like keybinds for next/prev entry selection

master
sin 11 년 전
부모
커밋
dc711f2fad
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. +3
    -0
      noice.c

+ 3
- 0
noice.c 파일 보기

@@ -34,6 +34,7 @@
#define LEN(x) (sizeof(x) / sizeof(*(x)))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define ISODD(x) ((x) & 1)
#define CONTROL(c) ((c) ^ 0x40)

struct assoc {
char *regex; /* Regex to match on filename */
@@ -182,12 +183,14 @@ nextsel(int *cur, int max)
/* next */
case 'j':
case KEY_DOWN:
case CONTROL('N'):
if (*cur < max - 1)
(*cur)++;
break;
/* prev */
case 'k':
case KEY_UP:
case CONTROL('P'):
if (*cur > 0)
(*cur)--;
break;


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