diff --git a/source/dialogs/combi.c b/source/dialogs/combi.c index 5631c519..a41e54e6 100644 --- a/source/dialogs/combi.c +++ b/source/dialogs/combi.c @@ -125,7 +125,14 @@ static int combi_mode_init ( Mode *sw ) static unsigned int combi_mode_get_num_entries ( const Mode *sw ) { const CombiModePrivateData *pd = (const CombiModePrivateData *) mode_get_private_data ( sw ); - return pd->cmd_list_length; + unsigned int length = 0; + for ( unsigned int i = 0; i < pd->num_switchers; i++ ) { + unsigned int entries = mode_get_num_entries ( pd->switchers[i].mode ); + pd->starts[i] = length; + pd->lengths[i] = entries; + length+=entries; + } + return length; } static void combi_mode_destroy ( Mode *sw ) { diff --git a/source/rofi.c b/source/rofi.c index f1a6c600..c13df1fe 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -579,6 +579,8 @@ static int add_mode ( const char * token ) // If not build in, use custom modi. Mode *sw = script_switcher_parse_setup ( token ); if ( sw != NULL ) { + // Add to available list, so combi can find it. + rofi_collect_modi_add(sw); modi[num_modi] = sw; num_modi++; }