cl: add X keybinding for search xcall

This commit is contained in:
Kaian 2016-02-05 13:06:18 +01:00
parent f74b1b430f
commit e60432b452
3 changed files with 10 additions and 2 deletions

View File

@ -560,6 +560,13 @@ call_list_handle_key(ui_t *ui, int key)
// Clear List
call_list_clear(ui);
break;
case ACTION_SEARCH_XCALL:
// Find current call xcall
call = call_get_xcall(vector_item(info->dcalls, info->cur_call));
if (call && vector_index(info->dcalls, call) != -1) {
call_list_move(ui, vector_index(info->dcalls, call));
}
break;
case ACTION_AUTOSCROLL:
info->autoscroll = (info->autoscroll) ? 0 : 1;
break;
@ -595,8 +602,6 @@ call_list_handle_key(ui_t *ui, int key)
break;
}
fprintf(stderr, "%d\n", action);
// Disable autoscroll on some key pressed
switch(action) {
case ACTION_DOWN:
@ -608,6 +613,7 @@ call_list_handle_key(ui_t *ui, int key)
case ACTION_BEGIN:
case ACTION_END:
case ACTION_DISP_FILTER:
case ACTION_SEARCH_XCALL:
info->autoscroll = 0;
break;
}

View File

@ -55,6 +55,7 @@ key_binding_t bindings[ACTION_SENTINEL] = {
{ ACTION_RESIZE_SCREEN, "", { KEY_RESIZE }, 1 },
{ ACTION_CLEAR, "clear", { KEY_CTRL('U'), KEY_CTRL('W')}, 2 },
{ ACTION_CLEAR_CALLS, "clearcalls", { KEY_F(5) }, 1 },
{ ACTION_SEARCH_XCALL, "searchxcall", { 'X' }, 1 },
{ ACTION_TOGGLE_SYNTAX, "togglesyntax", { KEY_F(8), 'C' }, 2 },
{ ACTION_CYCLE_COLOR, "colormode", { 'c' }, 1 },
{ ACTION_COMPRESS, "compress", { 's' }, 1 },

View File

@ -74,6 +74,7 @@ enum key_actions {
ACTION_RESIZE_SCREEN,
ACTION_CLEAR,
ACTION_CLEAR_CALLS,
ACTION_SEARCH_XCALL,
ACTION_TOGGLE_SYNTAX,
ACTION_CYCLE_COLOR,
ACTION_COMPRESS,