diff --git a/src/gui/interact/ui-coord-resolver.cpp b/src/gui/interact/ui-coord-resolver.cpp index ab9dcc50a..3f5540725 100644 --- a/src/gui/interact/ui-coord-resolver.cpp +++ b/src/gui/interact/ui-coord-resolver.cpp @@ -129,6 +129,7 @@ namespace interact { { return patt == Symbol::ANY or patt == Symbol::EMPTY + or patt == UIC_ELIDED // "existentially quantified" or (isAnchored() and curr == res_.anchor and depth == UIC_WINDOW); }; // transitive argument: assuming res_.anchor was computed for // the same coordinate pattern used here for patch resolution @@ -153,7 +154,8 @@ namespace interact { coverage.setAt (depth,curr); // record match rsp. interpolate wildcard into output iter.expandChildren(); // next iteration will match one level down into the tree } - return patt == curr; // only direct match counts as (partial) solution + return patt == curr // direct match counts as (partial) solution + or patt == UIC_ELIDED; // existentially quantified elements also accepted }) .filter ([&](auto& iter) { diff --git a/src/gui/interact/ui-coord-resolver.hpp b/src/gui/interact/ui-coord-resolver.hpp index 3faa4632a..ab32baac1 100644 --- a/src/gui/interact/ui-coord-resolver.hpp +++ b/src/gui/interact/ui-coord-resolver.hpp @@ -550,7 +550,9 @@ namespace interact { /** establish a trivial anchorage and coverage, if possible. * @note when the UICoord contains wildcards or is incomplete, * a full resolution with backtracking is necessary to - * determine anchorage and coverage + * determine anchorage and coverage. The same is true + * when the pattern uses an elided element, since such + * an existentially quantified item must be interpolated. */ void attempt_trivialResolution() @@ -558,6 +560,7 @@ namespace interact { res_.anchor = query_.determineAnchor (this->uic_); if (not uic_.isExplicit()) return; res_.depth = query_.determineCoverage(this->uic_); + if (util::contains (this->uic_, UIC_ELIDED)) return; // existentially quantified res_.isResolved = true; }