mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
parent
fb94f03b43
commit
5b13b8a12c
1 changed files with 7 additions and 1 deletions
|
@ -247,13 +247,19 @@ static bool match_obj_(struct match_state *st, size_t skips, size_t score, size_
|
||||||
* Attempt to use the current solution first, to try and avoid
|
* Attempt to use the current solution first, to try and avoid
|
||||||
* recalculating everything
|
* recalculating everything
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (st->orig[i] != UNMATCHED && !is_taken(i, st->res, st->orig[i])) {
|
if (st->orig[i] != UNMATCHED && !is_taken(i, st->res, st->orig[i])) {
|
||||||
st->res[i] = st->orig[i];
|
st->res[i] = st->orig[i];
|
||||||
if (match_obj_(st, skips, score + 1, replaced, i + 1)) {
|
if (match_obj_(st, skips, score + 1, replaced, i + 1)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (st->orig[i] == UNMATCHED) {
|
||||||
|
st->res[i] = UNMATCHED;
|
||||||
|
match_obj_(st, skips, score, replaced, i + 1);
|
||||||
|
if (st->exit_early) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (st->orig[i] != UNMATCHED) {
|
if (st->orig[i] != UNMATCHED) {
|
||||||
++replaced;
|
++replaced;
|
||||||
|
|
Loading…
Reference in a new issue