1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

[DRun] Allow url field to be searched and fix c/p error

Issue: #1914
This commit is contained in:
Dave Davenport 2023-10-31 13:24:37 +01:00
parent 1481030947
commit 3c87321258

View file

@ -697,7 +697,7 @@ static void read_desktop_file(DRunModePrivateData *pd, const char *root,
pd->entry_list[pd->cmd_list_length].url =
g_key_file_get_locale_string(kf, DRUN_GROUP_NAME, "URL", NULL, NULL);
} else {
pd->entry_list[pd->cmd_list_length].comment = NULL;
pd->entry_list[pd->cmd_list_length].url = NULL;
}
pd->entry_list[pd->cmd_list_length].icon_name =
g_key_file_get_locale_string(kf, DRUN_GROUP_NAME, "Icon", NULL, NULL);
@ -1456,6 +1456,13 @@ static int drun_token_match(const Mode *data, rofi_int_matcher **tokens,
}
}
}
if (matching_entry_fields[DRUN_MATCH_FIELD_URL].enabled_match) {
// Match executable name.
if (test == tokens[j]->invert && rmpd->entry_list[index].url) {
test = helper_token_match(ftokens, rmpd->entry_list[index].url);
}
}
if (matching_entry_fields[DRUN_MATCH_FIELD_COMMENT].enabled_match) {
// Match executable name.