1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | CUSTOM_COMMAND_SIG(sq_goto_next_jump) CUSTOM_DOC("Meaningful documentation.") { Heap *heap = &global_heap; Locked_Jump_State jump_state = get_locked_jump_state(app, heap); if (jump_state.view != 0){ i64 cursor_position = view_get_cursor_pos(app, jump_state.view); Buffer_Cursor cursor = view_compute_cursor(app, jump_state.view, seek_pos(cursor_position)); i64 line = get_line_from_list(app, jump_state.list, jump_state.list_index); if (line <= cursor.line){ jump_state.list_index += 1; } goto_next_filtered_jump(app, jump_state.list, jump_state.view, jump_state.list_index, 1, true, true); } } |
I noticed that both my new function as well as the original goto_next_jump are bound to the same key, even though I didn't change anything apart from copying the code and changing the command signature.