diff options
| -rw-r--r-- | config.def.h | 6 | ||||
| -rw-r--r-- | ui-curses.c | 1 | ||||
| -rw-r--r-- | ui-curses.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h index fdd20ae..1516762 100644 --- a/config.def.h +++ b/config.def.h @@ -104,7 +104,8 @@ static KeyBinding vis_movements[] = { { { NONE('j') }, movement, { .i = MOVE_LINE_DOWN } }, { { CONTROL('J') }, movement, { .i = MOVE_LINE_DOWN } }, { { CONTROL('N') }, movement, { .i = MOVE_LINE_DOWN } }, - { { KEY(ENTER) }, movement, { .i = MOVE_LINE_DOWN } }, + { { NONE('\n') }, movement, { .i = MOVE_LINE_DOWN } }, + { { NONE('\r') }, movement, { .i = MOVE_LINE_DOWN } }, { { NONE('g'), NONE('j') }, movement, { .i = MOVE_SCREEN_LINE_DOWN } }, { { NONE('g'), KEY(DOWN) }, movement, { .i = MOVE_SCREEN_LINE_DOWN } }, { { NONE('^') }, movement, { .i = MOVE_LINE_START } }, @@ -513,7 +514,8 @@ static KeyBinding vis_mode_readline[] = { static KeyBinding vis_mode_prompt[] = { { { KEY(BACKSPACE) }, prompt_backspace,{ .s = NULL } }, - { { KEY(ENTER) }, prompt_enter, { NULL } }, + { { NONE('\n') }, prompt_enter, { NULL } }, + { { NONE('\r') }, prompt_enter, { NULL } }, { { CONTROL('J') }, prompt_enter, { NULL } }, { { KEY(UP) }, prompt_up, { NULL } }, { { KEY(DOWN) }, prompt_down, { NULL } }, diff --git a/ui-curses.c b/ui-curses.c index a256461..4705d08 100644 --- a/ui-curses.c +++ b/ui-curses.c @@ -597,6 +597,7 @@ Ui *ui_curses_new(Color *colors) { use_default_colors(); raw(); noecho(); + nonl(); keypad(stdscr, TRUE); meta(stdscr, TRUE); curs_set(0); diff --git a/ui-curses.h b/ui-curses.h index 32cdf2f..a2e1dc6 100644 --- a/ui-curses.h +++ b/ui-curses.h @@ -15,7 +15,6 @@ enum { UI_KEY_DELETE = KEY_DC, UI_KEY_PAGE_DOWN = KEY_NPAGE, UI_KEY_PAGE_UP = KEY_PPAGE, - UI_KEY_ENTER = KEY_ENTER, UI_KEY_END = KEY_END, UI_KEY_SHIFT_LEFT = KEY_SLEFT, UI_KEY_SHIFT_RIGHT = KEY_SRIGHT, |
