diff --git a/src/curses/ui_call_list.c b/src/curses/ui_call_list.c index d8dcf1d..a1886b3 100644 --- a/src/curses/ui_call_list.c +++ b/src/curses/ui_call_list.c @@ -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; } diff --git a/src/keybinding.c b/src/keybinding.c index d457c25..feff37b 100644 --- a/src/keybinding.c +++ b/src/keybinding.c @@ -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 }, diff --git a/src/keybinding.h b/src/keybinding.h index 0b4ff06..1dc3bf5 100644 --- a/src/keybinding.h +++ b/src/keybinding.h @@ -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,